Minor changes

This commit is contained in:
Benoit Blanchon
2014-10-09 14:48:55 +02:00
parent 0dce0022d3
commit bf2d726746
3 changed files with 8 additions and 8 deletions

View File

@ -86,7 +86,7 @@ public:
void setAsDouble(double value, int decimals)
{
type = (JsonNodeType) (JSON_DOUBLE_0_DECIMALS + decimals);
type = static_cast<JsonNodeType>(JSON_DOUBLE_0_DECIMALS + decimals);
content.asDouble = value;
}
@ -111,7 +111,7 @@ public:
double getAsDouble()
{
return type > JSON_DOUBLE_0_DECIMALS ? content.asDouble : 0;
return type >= JSON_DOUBLE_0_DECIMALS ? content.asDouble : 0;
}
long getAsInteger()
@ -144,9 +144,9 @@ public:
return type == JSON_KEY_VALUE ? content.asKey.value : 0;
}
void addChildToContainer(JsonNode* childToAdd);
void addChild(JsonNode* childToAdd);
void removeChildFromContainer(JsonNode* childToRemove);
void removeChild(JsonNode* childToRemove);
private:
JsonNode* next;