summaryrefslogtreecommitdiff
path: root/include/m_json.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_json.h')
-rw-r--r--include/m_json.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/m_json.h b/include/m_json.h
index bf755ca2fe..1353041355 100644
--- a/include/m_json.h
+++ b/include/m_json.h
@@ -135,13 +135,11 @@ class JSONROOT
JSONNode *m_node;
public:
- __forceinline JSONROOT() { m_node = nullptr; }
- __forceinline JSONROOT(LPCSTR text) { Parse(text); }
+ __forceinline JSONROOT() : m_node(nullptr) {}
+ __forceinline JSONROOT(LPCSTR text) : m_node(json_parse(text)) {}
__forceinline ~JSONROOT() { json_delete(m_node); }
__forceinline operator JSONNode*() const { return m_node; }
-
- __forceinline JSONNode* Parse(LPCSTR text) { return (m_node = json_parse(text)); }
};
struct NULL_PARAM : public PARAM