summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/miranda.h15
-rw-r--r--src/core/stdchat/src/window.cpp4
-rw-r--r--src/core/stdfile/src/filesenddlg.cpp2
-rw-r--r--src/core/stduserinfo/src/contactinfo.cpp16
4 files changed, 11 insertions, 26 deletions
diff --git a/src/core/miranda.h b/src/core/miranda.h
index 2609052789..c5008e358a 100644
--- a/src/core/miranda.h
+++ b/src/core/miranda.h
@@ -172,21 +172,6 @@ int AssertInsideScreen(RECT &rc);
HBITMAP ConvertIconToBitmap(HICON hIcon, HIMAGELIST hIml, int iconId);
-class StrConvA
-{
-private:
- char* m_body;
-
-public:
- StrConvA(const wchar_t* pSrc) :
- m_body(mir_u2a(pSrc)) {}
-
- ~StrConvA() { mir_free(m_body); }
- operator const char* () const { return m_body; }
- operator const wchar_t* () const { return (wchar_t*)m_body; } // type cast to fake the interface definition
- operator const LPARAM () const { return (LPARAM)m_body; }
-};
-
///////////////////////////////////////////////////////////////////////////////
extern "C"
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp
index 3a7969746e..806fa9a128 100644
--- a/src/core/stdchat/src/window.cpp
+++ b/src/core/stdchat/src/window.cpp
@@ -357,11 +357,11 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
if (wParam <= '9' && wParam >= '1' && isCtrl && !isAlt) // CTRL + 1 -> 9 (switch tab)
if (g_Settings.bTabsEnable)
- SendMessage(GetParent(hwnd), GC_SWITCHTAB, 0, (LPARAM)((int)wParam - (int)'1'));
+ SendMessage(GetParent(hwnd), GC_SWITCHTAB, 0, (int)wParam - (int)'1');
if (wParam <= VK_NUMPAD9 && wParam >= VK_NUMPAD1 && isCtrl && !isAlt) // CTRL + 1 -> 9 (switch tab)
if (g_Settings.bTabsEnable)
- SendMessage(GetParent(hwnd), GC_SWITCHTAB, 0, (LPARAM)((int)wParam - (int)VK_NUMPAD1));
+ SendMessage(GetParent(hwnd), GC_SWITCHTAB, 0, (int)wParam - (int)VK_NUMPAD1);
if (wParam == VK_TAB && !isCtrl && !isShift) { //tab-autocomplete
TCHAR* pszText = NULL;
diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp
index fc410095cb..bb4128b9dd 100644
--- a/src/core/stdfile/src/filesenddlg.cpp
+++ b/src/core/stdfile/src/filesenddlg.cpp
@@ -141,7 +141,7 @@ void __cdecl ChooseFilesThread(void* param)
TCHAR *buf = (TCHAR*)mir_alloc(sizeof(TCHAR) * 32767);
if (buf == NULL) {
- PostMessage(hwndDlg, M_FILECHOOSEDONE, 0, (LPARAM)(TCHAR*)NULL);
+ PostMessage(hwndDlg, M_FILECHOOSEDONE, 0, NULL);
return;
}
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp
index 1e82742ef7..301371a4ef 100644
--- a/src/core/stduserinfo/src/contactinfo.cpp
+++ b/src/core/stduserinfo/src/contactinfo.cpp
@@ -267,7 +267,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
LVITEM lvi;
lvi.mask = LVIF_TEXT|LVIF_PARAM;
- lvi.lParam = (LPARAM)(-1);
+ lvi.lParam = -1;
lvi.iSubItem = 0;
lvi.iItem = 0;
for (i = -1;; i++) {
@@ -303,12 +303,12 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
lvi.iItem++;
}
lvi.mask = LVIF_PARAM;
- lvi.lParam = (LPARAM)(-2);
+ lvi.lParam = -2;
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi);
//phones
ListView_DeleteAllItems(GetDlgItem(hwndDlg, IDC_PHONES));
lvi.mask = LVIF_TEXT|LVIF_PARAM;
- lvi.lParam = (LPARAM)(-1);
+ lvi.lParam = -1;
lvi.iSubItem = 0;
lvi.iItem = 0;
if ( !db_get_ts(hContact, szProto, "Phone", &dbv)) {
@@ -368,7 +368,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
lvi.iItem++;
}
lvi.mask = LVIF_PARAM;
- lvi.lParam = (LPARAM)(-2);
+ lvi.lParam = -2;
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi);
}
}
@@ -410,9 +410,9 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
HICON hIcon = NULL;
- if (nm->nmcd.lItemlParam == (LPARAM)(-2) && nm->iSubItem-3 == (nm->nmcd.hdr.idFrom == IDC_PHONES))
+ if (nm->nmcd.lItemlParam == -2 && nm->iSubItem-3 == (nm->nmcd.hdr.idFrom == IDC_PHONES))
hIcon = LoadSkinIcon(SKINICON_OTHER_ADDCONTACT);
- else if (nm->iSubItem>1 && nm->nmcd.lItemlParam != (LPARAM)(-1) && nm->nmcd.lItemlParam != (LPARAM)(-2)) {
+ else if (nm->iSubItem>1 && nm->nmcd.lItemlParam != -1 && nm->nmcd.lItemlParam != -2) {
static int iconResources[3] = {SKINICON_OTHER_RENAME, SKINICON_OTHER_DELETE};
if (nm->iSubItem == 2 && nm->nmcd.hdr.idFrom == IDC_PHONES) {
TCHAR szText[2];
@@ -455,8 +455,8 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
lvi.iItem = hti.iItem;
lvi.iSubItem = 0;
ListView_GetItem(nm->hdr.hwndFrom, &lvi);
- if (lvi.lParam == (LPARAM)(-1)) break;
- if (lvi.lParam == (LPARAM)(-2)) {
+ if (lvi.lParam == -1) break;
+ if (lvi.lParam == -2) {
if (hti.iSubItem-3 == (nm->hdr.idFrom == IDC_PHONES)) {
//add
char szNewData[256] = "", idstr[33];