summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_icolib.cpp
diff options
context:
space:
mode:
authorKonstantin <apollo2k4@narod.ru>2018-05-20 21:09:53 +0300
committerKonstantin <apollo2k4@narod.ru>2018-05-20 21:09:53 +0300
commit46363eef857b69761f1d6d28da5a53a954f76900 (patch)
treeaf7282360d4c57aa26c1d9de260505583076c933 /plugins/MirLua/src/m_icolib.cpp
parent3f90207479ee0a6530631812717801a54093658c (diff)
Revert "Merge branch 'master' of https://github.com/miranda-ng/miranda-ng"
This reverts commit 3f90207479ee0a6530631812717801a54093658c, reversing changes made to 7d6b89fd45814936d0edeff664bf5efb2d19b875.
Diffstat (limited to 'plugins/MirLua/src/m_icolib.cpp')
-rw-r--r--plugins/MirLua/src/m_icolib.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/MirLua/src/m_icolib.cpp b/plugins/MirLua/src/m_icolib.cpp
index f9faa2997b..a83c9877d7 100644
--- a/plugins/MirLua/src/m_icolib.cpp
+++ b/plugins/MirLua/src/m_icolib.cpp
@@ -25,7 +25,8 @@ static void MakeSKINICONDESC(lua_State *L, SKINICONDESC &sid)
sid.defaultFile.w = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
- if (sid.defaultFile.w == nullptr) {
+ if (sid.defaultFile.w == nullptr)
+ {
sid.defaultFile.w = (wchar_t*)mir_calloc(MAX_PATH + 1);
GetModuleFileName(g_plugin.getInst(), sid.defaultFile.w, MAX_PATH);
}
@@ -51,7 +52,8 @@ static int lua_AddIcon(lua_State *L)
{
SKINICONDESC sid = { };
- if (lua_type(L, 1) == LUA_TSTRING) {
+ if (lua_type(L, 1) == LUA_TSTRING)
+ {
sid.flags = SIDF_ALL_UNICODE;
sid.pszName = mir_utf8decodeA(luaL_checkstring(L, 1));
sid.description.w = mir_utf8decodeW(luaL_checkstring(L, 2));
@@ -59,7 +61,8 @@ static int lua_AddIcon(lua_State *L)
sid.defaultFile.w = mir_utf8decodeW(lua_tostring(L, 4));
sid.hDefaultIcon = GetIcon(IDI_SCRIPT);
- if (sid.defaultFile.w == nullptr) {
+ if (sid.defaultFile.w == nullptr)
+ {
sid.defaultFile.w = (wchar_t*)mir_calloc(MAX_PATH + 1);
GetModuleFileName(g_plugin.getInst(), sid.defaultFile.w, MAX_PATH);
}
@@ -86,7 +89,8 @@ static int lua_GetIcon(lua_State *L)
bool big = luaM_toboolean(L, 2);
HICON hIcon = nullptr;
- switch (lua_type(L, 1)) {
+ switch (lua_type(L, 1))
+ {
case LUA_TLIGHTUSERDATA:
hIcon = IcoLib_GetIconByHandle(lua_touserdata(L, 1), big);
break;
@@ -117,7 +121,8 @@ static int lua_GetIconHandle(lua_State *L)
static int lua_RemoveIcon(lua_State *L)
{
- switch (lua_type(L, 1)) {
+ switch (lua_type(L, 1))
+ {
case LUA_TLIGHTUSERDATA:
IcoLib_RemoveIconByHandle(lua_touserdata(L, 1));
break;