jsoncpp/include/json
Hans Johnson b5093e8122 PERF: Allow compiler to choose best way to construct a copy
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
2019-01-15 18:30:49 -06:00
..
allocator.h Apply the formatting specified in .clang-format file. 2018-05-20 18:38:42 -04:00
assertions.h COMP: Prefer the C++ headers over the C99 headers 2018-12-30 15:29:22 -06:00
autolink.h Restore BL's authorship attribution, and add "The Jsoncpp Authors" where it was missing. 2017-07-21 03:44:36 -07:00
config.h ENH: Remove conditionals for unsupported VS compilers 2019-01-14 16:27:52 -06:00
features.h Restore BL's authorship attribution, and add "The Jsoncpp Authors" where it was missing. 2017-07-21 03:44:36 -07:00
forwards.h Restore BL's authorship attribution, and add "The Jsoncpp Authors" where it was missing. 2017-07-21 03:44:36 -07:00
json.h Apply the formatting specified in .clang-format file. 2018-05-20 18:38:42 -04:00
reader.h COMP: Use C++11 override directly 2019-01-14 16:14:12 -06:00
value.h PERF: Allow compiler to choose best way to construct a copy 2019-01-15 18:30:49 -06:00
version.h Apply the formatting specified in .clang-format file. 2018-05-20 18:38:42 -04:00
writer.h PERF: Allow compiler to choose best way to construct a copy 2019-01-15 18:30:49 -06:00