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 ++---- plugins/SimpleStatusMsg/src/awaymsg.cpp | 4 ++-- 2 files changed, 4 insertions(+), 6 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 diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 280351b7c7..114789ed5b 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -36,8 +36,8 @@ class CReadAwayMsgDlg : public CDlgBase CCtrlButton btnCopy; MCONTACT m_hContact; - HANDLE m_hSeq; - HANDLE m_hAwayMsgEvent; + HANDLE m_hSeq = nullptr; + HANDLE m_hAwayMsgEvent = nullptr; public: CReadAwayMsgDlg(MCONTACT hContact) : -- cgit v1.2.3