From 0ccf53dbbee25538795b39139318c7099c6700c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 3 Nov 2013 15:03:51 +0000 Subject: MirandaG15: useless ifdef removed git-svn-id: http://svn.miranda-ng.org/main/trunk@6755 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirandaG15/src/CAppletManager.cpp | 16 +--------------- plugins/MirandaG15/src/Miranda.cpp | 17 ----------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 099e929ab2..ea1739bb24 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -893,12 +893,7 @@ HANDLE CAppletManager::SendMessageToContact(HANDLE hContact,tstring strMessage) if(CAppletManager::IsUtfSendAvailable(pJob->hContact)) { pref = PREF_UTF; char* szMsgUtf = NULL; - #if defined( _UNICODE ) - szMsgUtf = mir_utf8encodeW( strMessage.c_str()); - #else - int codepage = CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 ); - szMsgUtf = mir_utf8encodecp(strMessage.c_str(), codepage); - #endif + szMsgUtf = mir_utf8encodeW( strMessage.c_str()); pJob->iBufferSize = strlen(szMsgUtf)+1; pJob->pcBuffer = (char *)malloc(pJob->iBufferSize); @@ -907,10 +902,7 @@ HANDLE CAppletManager::SendMessageToContact(HANDLE hContact,tstring strMessage) memcpy(pJob->pcBuffer,szMsgUtf,pJob->iBufferSize); mir_free(szMsgUtf); } else { - -#ifdef _UNICODE bIsUnicode = !IsUnicodeAscii(strMessage.c_str(),lstrlen(strMessage.c_str())); -#endif if(bIsUnicode) { pref = PREF_UNICODE; pJob->iBufferSize = bufSize * (sizeof(TCHAR) + 1); @@ -1021,7 +1013,6 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent,WPARAM wParam, LPARAM lPara { case EVENTTYPE_MESSAGE: msglen = strlen((char *) dbevent.pBlob) + 1; -#ifdef _UNICODE if (dbevent.flags & DBEF_UTF) { pEvent->strValue = Utf8_Decode((char*)dbevent.pBlob); } else if ((int) dbevent.cbBlob == msglen*3){ @@ -1029,9 +1020,6 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent,WPARAM wParam, LPARAM lPara } else { pEvent->strValue = toTstring((char*)dbevent.pBlob); } -#else - pEvent->strValue = toTstring((char*)dbevent.pBlob); -#endif pEvent->eType = (dbevent.flags & DBEF_SENT) ? EVENT_MSG_SENT:EVENT_MSG_RECEIVED; if(pEvent->eType == EVENT_MSG_RECEIVED) { @@ -1914,11 +1902,9 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam) Event.eType = EVENT_CONTACT_NICK; if(dbcws->value.type != DBVT_DELETED && dbcws->value.pszVal && strlen(dbcws->value.pszVal)>0) { -#ifdef _UNICODE if(dbcws->value.type == DBVT_UTF8) Event.strValue = Utf8_Decode(dbcws->value.pszVal); else -#endif Event.strValue = toTstring(dbcws->value.pszVal); } else diff --git a/plugins/MirandaG15/src/Miranda.cpp b/plugins/MirandaG15/src/Miranda.cpp index c6dca99adb..a4bf95631e 100644 --- a/plugins/MirandaG15/src/Miranda.cpp +++ b/plugins/MirandaG15/src/Miranda.cpp @@ -26,23 +26,6 @@ * Miranda.cpp: Miranda plugin initialisation */ -/* - * TODO: - -*/ -/* - * CHANGES: - */ -/* - * KNOWN BUGS: - * - */ - -/* - * IDEAS: - * - */ - #ifdef _DEBUG #include #define _CRTDBG_MAP_ALLOC -- cgit v1.2.3