File tree 5 files changed +5
-5
lines changed 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
358
358
359
359
/* * A simple way to update a specific setting.
360
360
*/
361
- Value& operator [](JSONCPP_STRING key);
361
+ Value& operator [](const JSONCPP_STRING& key);
362
362
363
363
/* * Called by ctor, but you can use this to reset settings_.
364
364
* \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 {
132
132
bool validate (Json::Value* invalid) const ;
133
133
/* * A simple way to update a specific setting.
134
134
*/
135
- Value& operator [](JSONCPP_STRING key);
135
+ Value& operator [](const JSONCPP_STRING& key);
136
136
137
137
/* * Called by ctor, but you can use this to reset settings_.
138
138
* \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 {
1969
1969
}
1970
1970
return 0u == inv.size ();
1971
1971
}
1972
- Value& CharReaderBuilder::operator [](JSONCPP_STRING key) {
1972
+ Value& CharReaderBuilder::operator [](const JSONCPP_STRING& key) {
1973
1973
return settings_[key];
1974
1974
}
1975
1975
// static
Original file line number Diff line number Diff line change @@ -1145,7 +1145,7 @@ const Value& Value::operator[](const char* key) const {
1145
1145
return nullSingleton ();
1146
1146
return *found;
1147
1147
}
1148
- Value const & Value::operator [](JSONCPP_STRING const & key) const {
1148
+ Value const & Value::operator [](const JSONCPP_STRING & key) const {
1149
1149
Value const * found = find (key.data (), key.data () + key.length ());
1150
1150
if (!found)
1151
1151
return nullSingleton ();
Original file line number Diff line number Diff line change @@ -1231,7 +1231,7 @@ bool StreamWriterBuilder::validate(Json::Value* invalid) const {
1231
1231
}
1232
1232
return 0u == inv.size ();
1233
1233
}
1234
- Value& StreamWriterBuilder::operator [](JSONCPP_STRING key) {
1234
+ Value& StreamWriterBuilder::operator [](const JSONCPP_STRING& key) {
1235
1235
return settings_[key];
1236
1236
}
1237
1237
// static
You can’t perform that action at this time.
0 commit comments