mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-26 08:47:31 +02:00
25 lines
454 B
C++
25 lines
454 B
C++
// Copyright Benoit Blanchon 2014-2015
|
|
// MIT License
|
|
//
|
|
// Arduino JSON library
|
|
// https://github.com/bblanchon/ArduinoJson
|
|
|
|
#pragma once
|
|
|
|
#include "../JsonBuffer.hpp"
|
|
|
|
namespace ArduinoJson {
|
|
namespace Internals {
|
|
|
|
class JsonBufferAllocated {
|
|
public:
|
|
void *operator new(size_t n, JsonBuffer *jsonBuffer) throw() {
|
|
if (!jsonBuffer) return NULL;
|
|
return jsonBuffer->alloc(n);
|
|
}
|
|
|
|
void operator delete(void *, JsonBuffer *) throw() {}
|
|
};
|
|
}
|
|
}
|