Fix compiler warnings (mainly signed/unsigned comparisons)

This commit is contained in:
Peter Wu 2012-08-25 19:21:58 +02:00
parent 9b3037d0e4
commit 689eb74945
4 changed files with 8 additions and 6 deletions

View file

@ -480,7 +480,7 @@ std::string JSON::Value::toPrettyString(int indentation){
break;
}
case STRING: {
for (int i = 0; i < 5 && i < strVal.size(); ++i){
for (unsigned int i = 0; i < 5 && i < strVal.size(); ++i){
if (strVal[i] < 32 || strVal[i] > 125){
return JSON::Value((long long int)strVal.size()).asString()+" bytes of binary data";
}