diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-07 18:38:44 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-07 18:38:44 +0200 |
| commit | c210f6793f3f1d62ff241bb31c42938e05e9a783 (patch) | |
| tree | a4330b922ee1ef549ff60070c34e13ecc9971926 /src/Daemon/ABRTPlugin.cpp | |
| parent | c64f91baf599133f88658e7a45a4d7e4a6c43d2b (diff) | |
| download | abrt-c210f6793f3f1d62ff241bb31c42938e05e9a783.tar.gz abrt-c210f6793f3f1d62ff241bb31c42938e05e9a783.tar.xz abrt-c210f6793f3f1d62ff241bb31c42938e05e9a783.zip | |
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 <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/ABRTPlugin.cpp')
| -rw-r--r-- | src/Daemon/ABRTPlugin.cpp | 50 |
1 files changed, 2 insertions, 48 deletions
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<p_plugin_info_t>(m_pDynamicLibrary->FindSymbol("plugin_info")); - m_pFnPluginNew = reinterpret_cast<p_fn_plugin_new_t>(m_pDynamicLibrary->FindSymbol("plugin_new")); + m_pPluginInfo = reinterpret_cast<typeof(m_pPluginInfo)>(m_pDynamicLibrary->FindSymbol("plugin_info")); + m_pFnPluginNew = reinterpret_cast<typeof(m_pFnPluginNew)>(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(); -} |
