diff --git a/Config.cpp b/Config.cpp index 1e18e198..d4cd8080 100644 --- a/Config.cpp +++ b/Config.cpp @@ -22,26 +22,26 @@ struct ConfigStackEntry { } }; -CConfig::CConfigEntry::CConfigEntry() +CConfigEntry::CConfigEntry() : m_pSubConfig(NULL) { } -CConfig::CConfigEntry::CConfigEntry(const CConfig& Config) +CConfigEntry::CConfigEntry(const CConfig& Config) : m_pSubConfig(new CConfig(Config)) { } -CConfig::CConfigEntry::CConfigEntry(const CConfigEntry& other) +CConfigEntry::CConfigEntry(const CConfigEntry& other) : m_pSubConfig(NULL) { if (other.m_pSubConfig) m_pSubConfig = new CConfig(*other.m_pSubConfig); } -CConfig::CConfigEntry::~CConfigEntry() +CConfigEntry::~CConfigEntry() { delete m_pSubConfig; } -CConfig::CConfigEntry& CConfig::CConfigEntry::operator=(const CConfigEntry& other) { +CConfigEntry& CConfigEntry::operator=(const CConfigEntry& other) { delete m_pSubConfig; if (other.m_pSubConfig) m_pSubConfig = new CConfig(*other.m_pSubConfig); diff --git a/Config.h b/Config.h index 202f7306..3c345ff5 100644 --- a/Config.h +++ b/Config.h @@ -13,19 +13,20 @@ #include "ZNCString.h" class CFile; +class CConfig; + +struct CConfigEntry { + CConfigEntry(); + CConfigEntry(const CConfig& Config); + CConfigEntry(const CConfigEntry& other); + ~CConfigEntry(); + CConfigEntry& operator=(const CConfigEntry& other); + + CConfig* m_pSubConfig; +}; class CConfig { public: - struct CConfigEntry { - CConfigEntry(); - CConfigEntry(const CConfig& Config); - CConfigEntry(const CConfigEntry& other); - ~CConfigEntry(); - CConfigEntry& operator=(const CConfigEntry& other); - - CConfig* m_pSubConfig; - }; - typedef map EntryMap; typedef map SubConfig; typedef map SubConfigMap; diff --git a/modules/modpython/modpython.i b/modules/modpython/modpython.i index f2e2b733..80800fc8 100644 --- a/modules/modpython/modpython.i +++ b/modules/modpython/modpython.i @@ -6,9 +6,6 @@ * by the Free Software Foundation. */ -// Supress "Nested struct not currently supported (ignored)." -#pragma SWIG nowarn=325 - %module znc_core %{ #include #include "../Utils.h"