File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
358358
359359 /* * A simple way to update a specific setting.
360360 */
361- Value& operator [](JSONCPP_STRING key);
361+ Value& operator [](const JSONCPP_STRING& key);
362362
363363 /* * Called by ctor, but you can use this to reset settings_.
364364 * \pre 'settings' != NULL (but Json::null is fine)
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
132132 bool validate (Json::Value* invalid) const ;
133133 /* * A simple way to update a specific setting.
134134 */
135- Value& operator [](JSONCPP_STRING key);
135+ Value& operator [](const JSONCPP_STRING& key);
136136
137137 /* * Called by ctor, but you can use this to reset settings_.
138138 * \pre 'settings' != NULL (but Json::null is fine)
Original file line number Diff line number Diff line change @@ -1969,7 +1969,7 @@ bool CharReaderBuilder::validate(Json::Value* invalid) const {
19691969 }
19701970 return 0u == inv.size ();
19711971}
1972- Value& CharReaderBuilder::operator [](JSONCPP_STRING key) {
1972+ Value& CharReaderBuilder::operator [](const JSONCPP_STRING& key) {
19731973 return settings_[key];
19741974}
19751975// static
Original file line number Diff line number Diff line change @@ -1145,7 +1145,7 @@ const Value& Value::operator[](const char* key) const {
11451145 return nullSingleton ();
11461146 return *found;
11471147}
1148- Value const & Value::operator [](JSONCPP_STRING const & key) const {
1148+ Value const & Value::operator [](const JSONCPP_STRING & key) const {
11491149 Value const * found = find (key.data (), key.data () + key.length ());
11501150 if (!found)
11511151 return nullSingleton ();
Original file line number Diff line number Diff line change @@ -1231,7 +1231,7 @@ bool StreamWriterBuilder::validate(Json::Value* invalid) const {
12311231 }
12321232 return 0u == inv.size ();
12331233}
1234- Value& StreamWriterBuilder::operator [](JSONCPP_STRING key) {
1234+ Value& StreamWriterBuilder::operator [](const JSONCPP_STRING& key) {
12351235 return settings_[key];
12361236}
12371237// static
You can’t perform that action at this time.
0 commit comments