Skip to content

Commit a269af3

Browse files
committed
Fix some conversion/shadowing warnings
1 parent 64e0daa commit a269af3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib_json/json_value.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void Value::CommentInfo::setComment(const char* text, size_t len) {
151151
text[0] == '\0' || text[0] == '/',
152152
"in Json::Value::setComment(): Comments must start with /");
153153
// It seems that /**/ style comments are acceptable as well.
154-
comment_ = duplicateStringValue(text, len);
154+
comment_ = duplicateStringValue(text, static_cast<unsigned int>(len));
155155
}
156156

157157
// //////////////////////////////////////////////////////////////////
@@ -1049,8 +1049,8 @@ bool Value::removeIndex(ArrayIndex index, Value* removed) {
10491049
ArrayIndex oldSize = size();
10501050
// shift left all items left, into the place of the "removed"
10511051
for (ArrayIndex i = index; i < (oldSize - 1); ++i){
1052-
CZString key(i);
1053-
(*value_.map_)[key] = (*this)[i + 1];
1052+
CZString indexKey(i);
1053+
(*value_.map_)[indexKey] = (*this)[i + 1];
10541054
}
10551055
// erase the last one ("leftover")
10561056
CZString keyLast(oldSize - 1);

0 commit comments

Comments
 (0)