Added more warning flags for GCC (as suggested in issue #28)

This commit is contained in:
Benoit Blanchon
2014-10-22 21:25:19 +02:00
parent c800948342
commit 7e98d136f4
7 changed files with 40 additions and 14 deletions

View File

@ -23,7 +23,7 @@ namespace ArduinoJson
JSON_PROXY,
JSON_DOUBLE_0_DECIMALS,
JSON_DOUBLE_1_DECIMAL,
JSON_DOUBLE_2_DECIMALS,
JSON_DOUBLE_2_DECIMALS
// etc.
};

View File

@ -12,32 +12,32 @@ namespace ArduinoJson
public:
explicit JsonNodeIterator(JsonNode* node)
: node(node)
: _node(node)
{
}
bool operator!= (const JsonNodeIterator& other) const
{
return node != other.node;
return _node != other._node;
}
void operator++()
{
node = node->next;
_node = _node->next;
}
JsonNode* operator*() const
{
return node;
return _node;
}
JsonNode* operator->() const
{
return node;
return _node;
}
private:
JsonNode* node;
JsonNode* _node;
};
}
}

View File

@ -22,7 +22,7 @@ namespace ArduinoJson
void add(bool value);
void add(const char* value);
void add(double value, int decimals=2);
void add(int value) { add((long) value); }
void add(int value) { add(static_cast<long>(value)); }
void add(long value);
void add(JsonContainer nestedArray); // TODO: should allow JsonValue too