Skip to content

Commit dcd666f

Browse files
authored
Merge pull request #2 from TechSmith/fixWarnings
Fix warnings
2 parents 64e0daa + 58e4b7e commit dcd666f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib_json/json_value.cpp

Lines changed: 4 additions & 4 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
// //////////////////////////////////////////////////////////////////
@@ -718,7 +718,7 @@ bool Value::asBool() const {
718718
case uintValue:
719719
return value_.uint_ ? true : false;
720720
case realValue:
721-
return value_.real_ ? true : false;
721+
return static_cast<bool>(value_.real_) ? true : false;
722722
default:
723723
break;
724724
}
@@ -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)