mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-13 18:27:10 +01:00
b5093e8122
With move semantics added to the language and the standard library updated with move constructors added for many types it is now interesting to take an argument directly by value, instead of by const-reference, and then copy. This check allows the compiler to take care of choosing the best way to construct the copy. The transformation is usually beneficial when the calling code passes an rvalue and assumes the move construction is a cheap operation. This short example illustrates how the construction of the value happens: SRCDIR=/Users/johnsonhj/src/jsoncpp/ #My local SRC BLDDIR=/Users/johnsonhj/src/jsoncpp/cmake-build-debug/ #My local BLD cd /Users/johnsonhj/src/jsoncpp/cmake-build-debug/ run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,modernize-pass-by-value -header-filter=.* -fix |
||
---|---|---|
.. | ||
allocator.h | ||
assertions.h | ||
autolink.h | ||
config.h | ||
features.h | ||
forwards.h | ||
json.h | ||
reader.h | ||
value.h | ||
version.h | ||
writer.h |