diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-07-29 17:47:12 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-07-29 17:47:12 +0000 |
commit | f55e022407a16984c6e69365a797a9d2e272ff17 (patch) | |
tree | 5e0571b7c876a9744652ffa6ba3dcef79dd5cd9b /libs/libjson | |
parent | f9a2944dcc9a4c1d85267a6e1971772bdbe08ae6 (diff) |
libjson: added operator <<
git-svn-id: http://svn.miranda-ng.org/main/trunk@14750 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'libs/libjson')
-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);
|