From c210f6793f3f1d62ff241bb31c42938e05e9a783 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 7 Aug 2009 18:38:44 +0200 Subject: replace string memebers of plugin_info_t with const char* Since they are constant, and we never ever want to change them, there is no benefit in having them as strings. This change removes one global data object's constructor and destructor from every applet .so module. 6k less code. Signed-off-by: Denys Vlasenko --- src/Daemon/ABRTPlugin.cpp | 50 ++--------------------------------------------- 1 file changed, 2 insertions(+), 48 deletions(-) (limited to 'src/Daemon/ABRTPlugin.cpp') diff --git a/src/Daemon/ABRTPlugin.cpp b/src/Daemon/ABRTPlugin.cpp index f2afa416..20486a2d 100644 --- a/src/Daemon/ABRTPlugin.cpp +++ b/src/Daemon/ABRTPlugin.cpp @@ -27,8 +27,8 @@ CABRTPlugin::CABRTPlugin(const std::string& pLibPath) : m_pFnPluginNew(NULL) { m_pDynamicLibrary = new CDynamicLibrary(pLibPath); - m_pPluginInfo = reinterpret_cast(m_pDynamicLibrary->FindSymbol("plugin_info")); - m_pFnPluginNew = reinterpret_cast(m_pDynamicLibrary->FindSymbol("plugin_new")); + m_pPluginInfo = reinterpret_cast(m_pDynamicLibrary->FindSymbol("plugin_info")); + m_pFnPluginNew = reinterpret_cast(m_pDynamicLibrary->FindSymbol("plugin_new")); } CABRTPlugin::~CABRTPlugin() @@ -38,49 +38,3 @@ CABRTPlugin::~CABRTPlugin() delete m_pDynamicLibrary; } } - -const std::string& CABRTPlugin::GetVersion() -{ - return m_pPluginInfo->m_sVersion; -} - -const int CABRTPlugin::GetMagicNumber() -{ - return m_pPluginInfo->m_nMagicNumber; -} - -const std::string& CABRTPlugin::GetName() -{ - return m_pPluginInfo->m_sName; -} - -const std::string& CABRTPlugin::GetDescription() -{ - return m_pPluginInfo->m_sDescription; -} - -const std::string& CABRTPlugin::GetEmail() -{ - return m_pPluginInfo->m_sEmail; -} - -const std::string& CABRTPlugin::GetWWW() -{ - return m_pPluginInfo->m_sWWW; -} - -const std::string& CABRTPlugin::GetGTKBuilder() -{ - return m_pPluginInfo->m_sGTKBuilder; -} - - -const plugin_type_t CABRTPlugin::GetType() -{ - return m_pPluginInfo->m_Type; -} - -CPlugin* CABRTPlugin::PluginNew() -{ - return m_pFnPluginNew(); -} -- cgit