mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Epic refactoring in progress...
This commit is contained in:
@@ -32,13 +32,8 @@ class JsonBuffer {
|
||||
JsonObject parseObject(char* json);
|
||||
JsonValue parseValue(char* json);
|
||||
|
||||
template <typename T>
|
||||
T* create() {
|
||||
void* p = alloc(sizeof(T));
|
||||
if (!p) return NULL;
|
||||
return new (p) T();
|
||||
}
|
||||
|
||||
virtual void* alloc(size_t size) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
void* operator new(size_t size, ArduinoJson::JsonBuffer* buffer);
|
||||
|
||||
Reference in New Issue
Block a user