From 413bfdfbc3b4bbcdf5ebe47d83c618c3781c6a82 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Mar 2019 18:48:25 +0300 Subject: warning fixes --- include/m_json.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') 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 -- cgit v1.2.3