forked from bblanchon/ArduinoJson
Reduced code size
This commit is contained in:
@ -14,6 +14,7 @@ namespace Internals {
|
|||||||
class JsonBufferAllocated {
|
class JsonBufferAllocated {
|
||||||
public:
|
public:
|
||||||
void *operator new(size_t n, JsonBuffer *jsonBuffer) throw() {
|
void *operator new(size_t n, JsonBuffer *jsonBuffer) throw() {
|
||||||
|
if (!jsonBuffer) return NULL;
|
||||||
return jsonBuffer->alloc(n);
|
return jsonBuffer->alloc(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,9 +79,6 @@ class JsonVariantBase {
|
|||||||
FORCE_INLINE const JsonObjectSubscript operator[](const char *key) const;
|
FORCE_INLINE const JsonObjectSubscript operator[](const char *key) const;
|
||||||
FORCE_INLINE const JsonObjectSubscript operator[](const String &key) const;
|
FORCE_INLINE const JsonObjectSubscript operator[](const String &key) const;
|
||||||
|
|
||||||
protected:
|
|
||||||
JsonVariantBase() {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const TImpl *impl() const { return static_cast<const TImpl *>(this); }
|
const TImpl *impl() const { return static_cast<const TImpl *>(this); }
|
||||||
};
|
};
|
||||||
|
@ -21,8 +21,6 @@ size_t List<T>::size() const {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename List<T>::node_type *List<T>::addNewNode() {
|
typename List<T>::node_type *List<T>::addNewNode() {
|
||||||
if (!_buffer) return NULL;
|
|
||||||
|
|
||||||
node_type *newNode = new (_buffer) node_type();
|
node_type *newNode = new (_buffer) node_type();
|
||||||
|
|
||||||
if (_firstNode) {
|
if (_firstNode) {
|
||||||
|
Reference in New Issue
Block a user