diff options
author | George Hazan <george.hazan@gmail.com> | 2016-08-31 12:38:00 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-08-31 12:38:00 +0000 |
commit | 9d50daf8ae4c81aa1b3bfd665f38a3c78068da23 (patch) | |
tree | ddd3523b06dac57f855a74850fa7168982de4391 | |
parent | ca942b88c295830544e03804666229e0e955f64b (diff) |
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@17227 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/Clist_modern/src/modern_skinopt.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/entities.h | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 1 | ||||
-rw-r--r-- | protocols/Yahoo/src/yahoo.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/addcontact.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/services.cpp | 1 |
7 files changed, 10 insertions, 14 deletions
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index c52fa1533e..ace3621e07 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -283,7 +283,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara return 0; wchar_t Author[255], URL[MAX_PATH], Contact[255], Description[400], text[2000]; - if (sd2->File && !wcschr(sd2->File, '%')) { + if (!wcschr(sd2->File, '%')) { GetPrivateProfileString(L"Skin_Description_Section", L"Author", TranslateT("( unknown )"), Author, _countof(Author), sd2->File); GetPrivateProfileString(L"Skin_Description_Section", L"URL", L"", URL, _countof(URL), sd2->File); GetPrivateProfileString(L"Skin_Description_Section", L"Contact", L"", Contact, _countof(Contact), sd2->File); diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 644134e6dd..6877134d6e 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -299,7 +299,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const wchar_t *szFormat, CMSt ptrW szXStatus(db_get_wsa(dat->hContact, dat->szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
- else dest.Append(dat->szStatus && dat->szStatus[0] ? dat->szStatus : L"(undef)");
+ else dest.Append(dat->szStatus[0] ? dat->szStatus : L"(undef)");
}
break;
diff --git a/protocols/FacebookRM/src/entities.h b/protocols/FacebookRM/src/entities.h index b997137043..2b98b5a393 100644 --- a/protocols/FacebookRM/src/entities.h +++ b/protocols/FacebookRM/src/entities.h @@ -140,7 +140,7 @@ struct facebook_notification this->hWndPopup = NULL; } - void setIcon(std::string iconUrl) + void setIcon(const std::string &iconUrl) { if (iconUrl == "https://www.facebook.com/rsrc.php/v2/yj/r/6WffvhOaXGY.png") icon = "like"; diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 6e74047802..ed7e110a8d 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -630,7 +630,6 @@ int __cdecl CYahooProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM {
switch (eventType) {
case EV_PROTO_ONLOAD: return OnModulesLoadedEx(0, 0);
- //case EV_PROTO_ONEXIT: return OnPreShutdown( 0, 0);
case EV_PROTO_ONOPTIONS: return OnOptionsInit(wParam, lParam);
case EV_PROTO_ONMENU:
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index d31b2f5240..499528b520 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -1437,7 +1437,7 @@ char * CYahooProto::ext_send_https_request(yahoo_data *yd, const char *host, con void CYahooProto::ext_login(enum yahoo_status login_mode)
{
- char host[128], fthost[128], login_host[128];
+ char host[128];
int port = 0;
DBVARIANT dbv;
#ifdef HTTP_GATEWAY
@@ -1491,8 +1491,6 @@ void CYahooProto::ext_login(enum yahoo_status login_mode) else strncpy_s(host, YAHOO_DEFAULT_LOGIN_SERVER, _TRUNCATE);
}
- mir_strncpy(fthost, getByte("YahooJapan", 0) ? "filetransfer.msg.yahoo.co.jp" : "filetransfer.msg.yahoo.com", sizeof(fthost));
- mir_strncpy(login_host, getByte("YahooJapan", 0) ? "login.yahoo.co.jp" : "login.yahoo.com", sizeof(login_host));
port = getWord(NULL, YAHOO_LOGINPORT, YAHOO_DEFAULT_PORT);
#ifdef HTTP_GATEWAY
@@ -1508,12 +1506,12 @@ void CYahooProto::ext_login(enum yahoo_status login_mode) m_id = yahoo_init_with_attributes(m_yahoo_id, m_password, m_pw_token,
"pager_host", host,
"pager_port", port,
- "filetransfer_host", fthost,
+ "filetransfer_host", "filetransfer.msg.yahoo.com",
"picture_checksum", getDword("AvatarHash", -1),
#ifdef HTTP_GATEWAY
"web_messenger", iHTTPGateway,
#endif
- "login_host", login_host,
+ "login_host", "login.yahoo.com",
NULL);
m_status = YAHOO_STATUS_OFFLINE;
diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp index 7b049000c0..5a3ef8408a 100644 --- a/src/mir_app/src/addcontact.cpp +++ b/src/mir_app/src/addcontact.cpp @@ -96,14 +96,12 @@ public: isSet = 1;
}
}
- if (!isSet)
- {
+ if (!isSet) {
if (m_acs.handleType == HANDLE_EVENT)
szName = mir_a2u(szUin);
- else
- {
+ else {
szName = sttDecodeString(m_acs.psr->flags, m_acs.psr->id);
- if (!szName)
+ if (szName == NULL)
szName = sttDecodeString(m_acs.psr->flags, m_acs.psr->nick);
}
}
diff --git a/src/mir_app/src/services.cpp b/src/mir_app/src/services.cpp index 65b27c4862..04f30a5aba 100644 --- a/src/mir_app/src/services.cpp +++ b/src/mir_app/src/services.cpp @@ -225,6 +225,7 @@ void UpdateFontSettings(FontIDW *font_id, FontSettingsW *fontsettings) CreateFromFontSettings(&font_id->deffontsettings, &lf);
colour = font_id->deffontsettings.colour;
}
+ else memset(&lf, 0, sizeof(lf));
fontsettings->style =
(lf.lfWeight == FW_NORMAL ? 0 : DBFONTF_BOLD) | (lf.lfItalic ? DBFONTF_ITALIC : 0) | (lf.lfUnderline ? DBFONTF_UNDERLINE : 0) | (lf.lfStrikeOut ? DBFONTF_STRIKEOUT : 0);
|