mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Test that adding the same value twice doesn't increase the size of the object
This commit is contained in:
@@ -28,13 +28,14 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual /*JsonNode&*/void allocateNode()
|
||||
virtual JsonNode* allocateNode()
|
||||
{
|
||||
if (_size < CAPACITY)
|
||||
_size++;
|
||||
if (_size >= CAPACITY) return 0;
|
||||
|
||||
return &_buffer[_size++];
|
||||
}
|
||||
|
||||
private:
|
||||
//JsonNode _buffer[CAPACITY];
|
||||
JsonNode _buffer[CAPACITY];
|
||||
int _size;
|
||||
};
|
||||
Reference in New Issue
Block a user