diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-05 19:16:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-05 19:16:07 +0300 |
commit | 1a08ba6930125cf92cb9584e63d37794e21ce83b (patch) | |
tree | 35a90492d65fb92d7bb7da5f14b77ecca03bc1cb /plugins/SimpleStatusMsg/src/main.cpp | |
parent | 1bd627ccc1014b3d9c611815663145d9a6094461 (diff) |
SimpleStatusMsg: obsolete code removed
Diffstat (limited to 'plugins/SimpleStatusMsg/src/main.cpp')
-rw-r--r-- | plugins/SimpleStatusMsg/src/main.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index eddf7ad04f..2e89bfffdd 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -58,18 +58,15 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY static wchar_t* GetWinampSong(void)
{
- wchar_t *szTitle, *pstr, *res = nullptr;
HWND hwndWinamp = FindWindow(L"STUDIO", nullptr);
- int iTitleLen;
-
if (hwndWinamp == nullptr)
hwndWinamp = FindWindow(L"Winamp v1.x", nullptr);
if (hwndWinamp == nullptr)
return nullptr;
- iTitleLen = GetWindowTextLength(hwndWinamp);
- szTitle = (wchar_t *)mir_alloc((iTitleLen + 1) * sizeof(wchar_t));
+ int iTitleLen = GetWindowTextLength(hwndWinamp);
+ wchar_t *szTitle = (wchar_t *)mir_alloc((iTitleLen + 1) * sizeof(wchar_t));
if (szTitle == nullptr)
return nullptr;
@@ -78,7 +75,7 @@ static wchar_t* GetWinampSong(void) return nullptr;
}
- pstr = wcsstr(szTitle, L" - Winamp");
+ wchar_t *pstr = wcsstr(szTitle, L" - Winamp");
if (pstr == nullptr) {
mir_free(szTitle);
return nullptr;
@@ -101,7 +98,7 @@ static wchar_t* GetWinampSong(void) }
pstr += 2;
- res = mir_wstrdup(pstr);
+ wchar_t *res = mir_wstrdup(pstr);
mir_free(szTitle);
return res;
|