summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-06-16 08:37:02 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-06-16 08:37:02 +0000
commit3e9bfc4ac3dd4ff9efd01e9c492b1c0ad0c1a67f (patch)
tree9211c39c70766912734a9b329d42b9f818ee5bbd /plugins/MirLua
parentf377892737f9f228ad383f7781ed06439eb1f087 (diff)
MirLua: code optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16993 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/m_options.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/plugins/MirLua/src/m_options.cpp b/plugins/MirLua/src/m_options.cpp
index fb74776ca8..37f1d27b22 100644
--- a/plugins/MirLua/src/m_options.cpp
+++ b/plugins/MirLua/src/m_options.cpp
@@ -3,36 +3,33 @@
class CMLuaScriptOptionPage : public CDlgBase
{
private:
+ int m_onInitDialogRef;
+ int m_onApplyRef;
lua_State *L;
- int onInitDialogRef;
- int onApplyRef;
public:
- CMLuaScriptOptionPage(lua_State *L, int onInitDialogRef, int onApplyRef)
- : CDlgBase(g_hInstance, IDD_SCRIPTOPTIONSPAGE), L(L),
- onInitDialogRef(onInitDialogRef), onApplyRef(onApplyRef)
+ CMLuaScriptOptionPage(lua_State *_L, int onInitDialogRef, int onApplyRef)
+ : CDlgBase(g_hInstance, IDD_SCRIPTOPTIONSPAGE), L(_L),
+ m_onInitDialogRef(onInitDialogRef), m_onApplyRef(onApplyRef)
{
}
-protected:
- void OnInitDialog()
+ void OnInitDialog() override
{
- if (onInitDialogRef)
+ if (m_onInitDialogRef)
{
- lua_rawgeti(L, LUA_REGISTRYINDEX, onInitDialogRef);
-
- lua_pushlightuserdata(L, (void*)this->GetHwnd());
+ lua_rawgeti(L, LUA_REGISTRYINDEX, m_onInitDialogRef);
+ lua_pushlightuserdata(L, m_hwnd);
luaM_pcall(L, 1, 0);
}
}
- void OnApply()
+ void OnApply() override
{
- if (onApplyRef)
+ if (m_onApplyRef)
{
- lua_rawgeti(L, LUA_REGISTRYINDEX, onApplyRef);
-
- lua_pushlightuserdata(L, (void*)this->GetHwnd());
+ lua_rawgeti(L, LUA_REGISTRYINDEX, m_onApplyRef);
+ lua_pushlightuserdata(L, m_hwnd);
luaM_pcall(L, 1, 0);
}
}