mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
@@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define JSON_FORCE_INLINE __forceinline
|
||||
#define FORCE_INLINE __forceinline
|
||||
#else
|
||||
#define JSON_FORCE_INLINE __attribute__((always_inline))
|
||||
#define FORCE_INLINE __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,7 @@ class JsonParser {
|
||||
void skipSpaces();
|
||||
|
||||
bool parseAnythingTo(JsonVariant *destination);
|
||||
JSON_FORCE_INLINE bool parseAnythingToUnsafe(JsonVariant *destination);
|
||||
FORCE_INLINE bool parseAnythingToUnsafe(JsonVariant *destination);
|
||||
|
||||
const char *parseString();
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ inline char const* JsonVariantContent::as<char const*>() const {
|
||||
return asString;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline String JsonVariantContent::as<String>() const {
|
||||
return asString;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline double JsonVariantContent::as<double>() const {
|
||||
return asDouble;
|
||||
|
||||
@@ -48,22 +48,7 @@ class List {
|
||||
const_iterator end() const { return const_iterator(NULL); }
|
||||
|
||||
protected:
|
||||
node_type *addNewNode() {
|
||||
if (!_buffer) return NULL;
|
||||
|
||||
node_type *newNode = new (_buffer) node_type();
|
||||
|
||||
if (_firstNode) {
|
||||
node_type *lastNode = _firstNode;
|
||||
while (lastNode->next) lastNode = lastNode->next;
|
||||
lastNode->next = newNode;
|
||||
} else {
|
||||
_firstNode = newNode;
|
||||
}
|
||||
|
||||
return newNode;
|
||||
}
|
||||
|
||||
node_type *addNewNode();
|
||||
void removeNode(node_type *nodeToRemove);
|
||||
|
||||
JsonBuffer *_buffer;
|
||||
|
||||
Reference in New Issue
Block a user