summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
commit8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch)
tree03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/HistoryStats/src
parentc5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff)
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/HistoryStats/src')
-rw-r--r--plugins/HistoryStats/src/main.cpp10
-rw-r--r--plugins/HistoryStats/src/main.h2
-rw-r--r--plugins/HistoryStats/src/settings.cpp4
-rw-r--r--plugins/HistoryStats/src/stdafx.h4
4 files changed, 11 insertions, 9 deletions
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index 44aba9af45..151ce2ecf5 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -16,7 +16,7 @@ int &hLangpack(g_plugin.m_hLang);
static const int g_pluginFileListID = 2535;
-PLUGININFOEX g_pluginInfoEx = {
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
@@ -29,6 +29,10 @@ PLUGININFOEX g_pluginInfoEx = {
{0xf184f5a0, 0xc198, 0x4454, {0xa9, 0xb4, 0xf6, 0xe2, 0xfd, 0x53, 0x41, 0x33}},
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>("HistoryStats", pluginInfoEx)
+{}
+
SettingsSerializer* g_pSettings = nullptr;
bool g_bMainMenuExists = false;
@@ -383,12 +387,12 @@ extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
OutputDebugString(L"HistoryStats: MirandaPluginInfoEx() was called.\n");
// MEMO: (don't) fail, if version is below minimum
- return &g_pluginInfoEx;
+ return &pluginInfoEx;
}
extern "C" __declspec(dllexport) int Load()
{
- mir_getLP(&g_pluginInfoEx);
+ mir_getLP(&pluginInfoEx);
// init COM, needed for GUID generation
CoInitialize(nullptr);
diff --git a/plugins/HistoryStats/src/main.h b/plugins/HistoryStats/src/main.h
index a2dffb20c6..1d2048d05c 100644
--- a/plugins/HistoryStats/src/main.h
+++ b/plugins/HistoryStats/src/main.h
@@ -7,7 +7,7 @@
#include "settingsserializer.h"
#include "statistic.h"
-extern PLUGININFOEX g_pluginInfoEx;
+extern PLUGININFOEX pluginInfoEx;
extern SettingsSerializer* g_pSettings;
diff --git a/plugins/HistoryStats/src/settings.cpp b/plugins/HistoryStats/src/settings.cpp
index f41602217c..08f1518ea7 100644
--- a/plugins/HistoryStats/src/settings.cpp
+++ b/plugins/HistoryStats/src/settings.cpp
@@ -161,7 +161,7 @@ void Settings::clearColumns()
}
Settings::Settings() :
- m_VersionCurrent(g_pluginInfoEx.version),
+ m_VersionCurrent(pluginInfoEx.version),
// global settings
m_OnStartup(false),
@@ -232,7 +232,7 @@ Settings::Settings() :
}
Settings::Settings(const Settings& other) :
- m_VersionCurrent(g_pluginInfoEx.version)
+ m_VersionCurrent(pluginInfoEx.version)
{
*this = other;
}
diff --git a/plugins/HistoryStats/src/stdafx.h b/plugins/HistoryStats/src/stdafx.h
index 55e11acbb8..f61e53f3ea 100644
--- a/plugins/HistoryStats/src/stdafx.h
+++ b/plugins/HistoryStats/src/stdafx.h
@@ -126,9 +126,7 @@ namespace ext
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>("HistoryStats")
- {}
+ CMPlugin();
};
#endif // HISTORYSTATS_GUARD__GLOABLS_H