diff options
Diffstat (limited to 'libs/libjson/src')
-rw-r--r-- | libs/libjson/src/JSONNode.h | 1 | ||||
-rw-r--r-- | libs/libjson/src/JSONNode.inl | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libs/libjson/src/JSONNode.h b/libs/libjson/src/JSONNode.h index 0a5ae52bb1..487509d852 100644 --- a/libs/libjson/src/JSONNode.h +++ b/libs/libjson/src/JSONNode.h @@ -150,6 +150,7 @@ public: #else
void push_back(const JSONNode & node);
#endif
+ JSONNode& operator<<(const JSONNode & node);
void reserve(json_index_t size);
JSONNode JSON_PTR_LIB pop_back(json_index_t pos);
JSONNode JSON_PTR_LIB pop_back(const json_string & name_t);
diff --git a/libs/libjson/src/JSONNode.inl b/libs/libjson/src/JSONNode.inl index 9562e3f3ec..d895a977f7 100644 --- a/libs/libjson/src/JSONNode.inl +++ b/libs/libjson/src/JSONNode.inl @@ -148,6 +148,12 @@ inline void JSONNode::push_back(const JSONNode & child){ internal -> push_back(child);
}
+inline JSONNode& JSONNode::operator<<(const JSONNode &node)
+{
+ push_back(node);
+ return *this;
+}
+
inline void JSONNode::reserve(json_index_t size){
makeUniqueInternal();
internal -> reserve(size);
|