Skip to content
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

Change functions that accept a JsonObject to take that as reference to const. #35936

Merged
merged 6 commits into from
Dec 9, 2019

Conversation

BevapDin
Copy link
Contributor

@BevapDin BevapDin commented Dec 7, 2019

Instead of what is currently done: either those functions accept a value (a copy of the argument, which means overhead) or a non-const value, which means one can't use a temporary object.

SUMMARY: None

…o const.

Those functions do not change the object, they just read values from it. This avoid unnecessary copy-operations and allows usage of temporary objects (which don't bind to non-const references).
@ifreund ifreund added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Dec 8, 2019
Error reporting functions are public and can be called on any object, even on those that do not have an associated stream.
@ZhilkinSerg ZhilkinSerg merged commit 604b633 into CleverRaven:master Dec 9, 2019
@BevapDin BevapDin deleted the dse branch December 9, 2019 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants