mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-13 10:22:55 +01:00
PERF: Replace explicit return calls of constructor
Replaces explicit calls to the constructor in a return with a braced initializer list. This way the return type is not needlessly duplicated in the function definition and the return statement. 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-return-braced-init-list -header-filter=.* -fix
This commit is contained in:
parent
9026a16ff5
commit
4abf4ec208
@ -69,7 +69,7 @@ Features::Features()
|
||||
: allowComments_(true), strictRoot_(false),
|
||||
allowDroppedNullPlaceholders_(false), allowNumericKeys_(false) {}
|
||||
|
||||
Features Features::all() { return Features(); }
|
||||
Features Features::all() { return {}; }
|
||||
|
||||
Features Features::strictMode() {
|
||||
Features features;
|
||||
@ -906,7 +906,7 @@ public:
|
||||
// exact copy of Implementation of class Features
|
||||
// ////////////////////////////////
|
||||
|
||||
OurFeatures OurFeatures::all() { return OurFeatures(); }
|
||||
OurFeatures OurFeatures::all() { return {}; }
|
||||
|
||||
// Implementation of class Reader
|
||||
// ////////////////////////////////
|
||||
|
@ -1507,7 +1507,7 @@ Value::const_iterator Value::begin() const {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return const_iterator();
|
||||
return {};
|
||||
}
|
||||
|
||||
Value::const_iterator Value::end() const {
|
||||
@ -1520,7 +1520,7 @@ Value::const_iterator Value::end() const {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return const_iterator();
|
||||
return {};
|
||||
}
|
||||
|
||||
Value::iterator Value::begin() {
|
||||
|
Loading…
Reference in New Issue
Block a user