-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small fixes #2852
base: master
Are you sure you want to change the base?
Small fixes #2852
Conversation
rinatxp
commented
Apr 30, 2023
•
edited
Loading
edited
- converting some switch statements to switch expressions;
- other small fixes (null-condition operators, object initializers etc)
_writer.Write("/*"); | ||
_writer.Write(text); | ||
_writer.Write("*/"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such calls here are intentionally to avoid string allocations when doing string interpolation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cancelled all such commits
Src/Newtonsoft.Json/JsonWriter.cs
Outdated
_currentPosition = _stack[_stack.Count - 1]; | ||
_stack.RemoveAt(_stack.Count - 1); | ||
_currentPosition = _stack.Last(); | ||
_stack.Remove(_stack.Last()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_stack.RemoveAt(_stack.Count - 1);
is not the same as _stack.Remove(_stack.Last());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cancelled this too
Reverted bad commits and added some new |