File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1019,29 +1019,29 @@ Value Value::removeMember(const std::string& key) {
1019
1019
}
1020
1020
1021
1021
bool Value::removeIndex (ArrayIndex index, Value* removed) {
1022
- if (this -> type_ != arrayValue) {
1022
+ if (type_ != arrayValue) {
1023
1023
return false ;
1024
1024
}
1025
1025
#ifdef JSON_VALUE_USE_INTERNAL_MAP
1026
1026
JSON_FAIL_MESSAGE (" removeIndex is not implemented for ValueInternalArray." );
1027
1027
return false ;
1028
1028
#else
1029
1029
CZString key (index);
1030
- ObjectValues::iterator it = this -> value_ .map_ ->find (key);
1031
- if (it == this -> value_ .map_ ->end ()) {
1030
+ ObjectValues::iterator it = value_.map_ ->find (key);
1031
+ if (it == value_.map_ ->end ()) {
1032
1032
return false ;
1033
1033
}
1034
1034
*removed = it->second ;
1035
- ArrayIndex oldSize = this -> size ();
1035
+ ArrayIndex oldSize = size ();
1036
1036
// shift left all items left, into the place of the "removed"
1037
1037
for (ArrayIndex i=index; i<oldSize-1 ; i++){
1038
1038
CZString key (i);
1039
- (*this -> value_ .map_ )[key] = (*this )[i+1 ];
1039
+ (*value_.map_ )[key] = (*this )[i+1 ];
1040
1040
}
1041
1041
// erase the last one ("leftover")
1042
1042
CZString keyLast (oldSize-1 );
1043
- ObjectValues::iterator itLast = this -> value_ .map_ ->find (keyLast);
1044
- this -> value_ .map_ ->erase (itLast);
1043
+ ObjectValues::iterator itLast = value_.map_ ->find (keyLast);
1044
+ value_.map_ ->erase (itLast);
1045
1045
return true ;
1046
1046
#endif
1047
1047
}
You can’t perform that action at this time.
0 commit comments