Switched to Google coding style to match cpplint expectations

This commit is contained in:
Benoit Blanchon
2014-10-23 23:13:13 +02:00
parent 5c8283b3e4
commit b43da1e421
47 changed files with 262 additions and 308 deletions

View File

@@ -4,10 +4,11 @@
#include "JsonObject.hpp"
namespace ArduinoJson {
template <int CAPACITY> class StaticJsonBuffer : public JsonBuffer {
template <int CAPACITY>
class StaticJsonBuffer : public JsonBuffer {
friend class JsonObject;
public:
public:
explicit StaticJsonBuffer() : _size(0) {}
virtual ~StaticJsonBuffer() {}
@@ -16,15 +17,14 @@ public:
int size() { return _size; }
protected:
protected:
virtual void *allocateNode() {
if (_size >= CAPACITY)
return 0;
if (_size >= CAPACITY) return 0;
return &_buffer[_size++];
}
private:
private:
Internals::JsonNode _buffer[CAPACITY];
int _size;
};