diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-24 19:53:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-24 19:53:50 +0300 |
commit | 7ed195f3bfe7512511abe502b4eeb447281ac3c5 (patch) | |
tree | fae229cbd6dbbde118141d62ad3b5c5d3a190b48 | |
parent | 7f5b936071e3a02fee7f7156157f2d0f776bb395 (diff) |
minor code cleaning
-rw-r--r-- | protocols/Discord/src/avatars.cpp | 7 | ||||
-rw-r--r-- | protocols/FacebookRM/src/avatars.cpp | 13 | ||||
-rw-r--r-- | protocols/Icq10/src/utils.cpp | 9 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 3 | ||||
-rw-r--r-- | protocols/MSN/src/msn_svcs.cpp | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_avatars.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_avatars.cpp | 7 |
7 files changed, 2 insertions, 43 deletions
diff --git a/protocols/Discord/src/avatars.cpp b/protocols/Discord/src/avatars.cpp index ead76f36da..7b6e763b3d 100644 --- a/protocols/Discord/src/avatars.cpp +++ b/protocols/Discord/src/avatars.cpp @@ -41,10 +41,6 @@ INT_PTR CDiscordProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) ((POINT*)lParam)->x = ((POINT*)lParam)->y = 128; break; - case AF_PROPORTION: - res = PIP_NONE; - break; - case AF_FORMATSUPPORTED: res = lParam == PA_FORMAT_PNG || lParam == PA_FORMAT_GIF || lParam == PA_FORMAT_JPEG; break; @@ -53,8 +49,7 @@ INT_PTR CDiscordProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) case AF_DONTNEEDDELAYS: case AF_FETCHIFPROTONOTVISIBLE: case AF_FETCHIFCONTACTOFFLINE: - res = 1; - break; + return 1; } return res; diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index 25163a3797..fd3ef35a0d 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -137,14 +137,6 @@ INT_PTR FacebookProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) ((POINT*)lParam)->y = -1;
break;
- case AF_MAXFILESIZE:
- res = 0;
- break;
-
- case AF_PROPORTION:
- res = PIP_NONE;
- break;
-
case AF_FORMATSUPPORTED:
res = (lParam == PA_FORMAT_JPEG || lParam == PA_FORMAT_GIF);
break;
@@ -153,11 +145,6 @@ INT_PTR FacebookProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) res = 10 * 60 * 1000;
break;
- case AF_DONTNEEDDELAYS:
- // We need delays because of larger friend lists
- res = 0;
- break;
-
case AF_ENABLED:
case AF_FETCHIFPROTONOTVISIBLE:
case AF_FETCHIFCONTACTOFFLINE:
diff --git a/protocols/Icq10/src/utils.cpp b/protocols/Icq10/src/utils.cpp index 0ed21af36c..d3c01b8dcb 100644 --- a/protocols/Icq10/src/utils.cpp +++ b/protocols/Icq10/src/utils.cpp @@ -71,21 +71,12 @@ INT_PTR __cdecl CIcqProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) ((POINT*)lParam)->y = -1; return 0; - case AF_MAXFILESIZE: - return 0; - - case AF_PROPORTION: - return PIP_NONE; - case AF_FORMATSUPPORTED: // nobody return 1; case AF_DELAYAFTERFAIL: return 10 * 60 * 1000; - case AF_DONTNEEDDELAYS: // We need delays because of larger friend lists - return 0; - case AF_ENABLED: case AF_FETCHIFPROTONOTVISIBLE: case AF_FETCHIFCONTACTOFFLINE: diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 4dc4ed5ce1..b801b8348f 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -100,9 +100,6 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarCaps(WPARAM wParam, LPARAM lParam) }
return 0;
- case AF_PROPORTION:
- return PIP_NONE;
-
case AF_FORMATSUPPORTED: // Jabber supports avatars of virtually all formats
return 1;
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 01d2f1c2a8..65dd44b6cc 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -151,10 +151,6 @@ INT_PTR CMsnProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) ((POINT*)lParam)->y = 96;
break;
- case AF_PROPORTION:
- res = PIP_NONE;
- break;
-
case AF_FORMATSUPPORTED:
res = lParam == PA_FORMAT_PNG || lParam == PA_FORMAT_GIF || lParam == PA_FORMAT_JPEG;
break;
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 11f5535664..d97a64de66 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -23,7 +23,7 @@ INT_PTR CSkypeProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam) case AF_MAXSIZE:
((POINT*)lParam)->x = 98;
((POINT*)lParam)->y = 98;
- return 0;
+ break;
case AF_MAXFILESIZE:
return 32000;
diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp index a4ed74dd27..29f1cb9938 100644 --- a/protocols/Steam/src/steam_avatars.cpp +++ b/protocols/Steam/src/steam_avatars.cpp @@ -116,13 +116,6 @@ INT_PTR CSteamProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) case AF_ENABLED:
return 1;
- /*case AF_DONTNEEDDELAYS:
- return 1;*/
-
- /*case AF_MAXFILESIZE:
- // server accepts images of 32000 bytees, not bigger
- return 32000;*/
-
case AF_DELAYAFTERFAIL:
// request avatar again in one hour if server gave an error
return 60 * 60 * 1000;
|