mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-18 03:29:46 +02: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:

committed by
Christopher Dunn

parent
9026a16ff5
commit
4abf4ec208
@@ -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() {
|
||||
|
Reference in New Issue
Block a user