Change unsigned to size_t
This commit is contained in:
@@ -210,11 +210,11 @@ class JSON
|
||||
return internal.Map->at( key );
|
||||
}
|
||||
|
||||
JSON &at( unsigned index ) {
|
||||
JSON &at( size_t index ) {
|
||||
return operator[]( index );
|
||||
}
|
||||
|
||||
const JSON &at( unsigned index ) const {
|
||||
const JSON &at( size_t index ) const {
|
||||
return internal.List->at( index );
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ class JSON
|
||||
private:
|
||||
static std::string json_escape( const std::string &str ) {
|
||||
std::string output;
|
||||
for( unsigned i = 0; i < str.length(); ++i )
|
||||
for( size_t i = 0; i < str.length(); ++i )
|
||||
switch( str[i] ) {
|
||||
case '\"': output += "\\\""; break;
|
||||
case '\\': output += "\\\\"; break;
|
||||
@@ -428,7 +428,7 @@ struct JSONParser {
|
||||
|
||||
static JSON parse_array( const std::string &str, size_t &offset ) {
|
||||
JSON Array( JSON::Class::Array );
|
||||
unsigned index = 0;
|
||||
size_t index = 0;
|
||||
|
||||
++offset;
|
||||
consume_ws( str, offset );
|
||||
@@ -469,7 +469,7 @@ struct JSONParser {
|
||||
case 't' : val += '\t'; break;
|
||||
case 'u' : {
|
||||
val += "\\u" ;
|
||||
for( unsigned i = 1; i <= 4; ++i ) {
|
||||
for( size_t i = 1; i <= 4; ++i ) {
|
||||
c = str[offset+i];
|
||||
if( (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') )
|
||||
val += c;
|
||||
|
Reference in New Issue
Block a user