summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-21 12:33:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-21 12:33:31 +0300
commitca5001026a94f702c4012c5e8d2093ad3f51c1fa (patch)
tree554ad80633528d530057fc61035b15f901860ed2 /protocols/Steam/src/steam_proto.cpp
parente0799755b3966d1d6d8275ee5127242ec029a4e6 (diff)
code cleaning:
- in conformance to C++'11 rules, we don't declare a method as virtual if it's declared as override; - cause this code isn't visible in Pascal anymore, there's no need to use __cdecl calling convention for virtual methods; - since PROTO_INTERFACE is a regular C++ class, there's no need to use old style service declarations for virtual methods like OnModulesLoaded / OnShutdown
Diffstat (limited to 'protocols/Steam/src/steam_proto.cpp')
-rw-r--r--protocols/Steam/src/steam_proto.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index 6ca91ace53..ec77254b02 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -187,7 +187,7 @@ int CSteamProto::AuthRequest(MCONTACT hContact, const wchar_t*)
return 1;
}
-DWORD_PTR CSteamProto:: GetCaps(int type, MCONTACT)
+INT_PTR CSteamProto::GetCaps(int type, MCONTACT)
{
switch (type) {
case PFLAGNUM_1:
@@ -199,7 +199,7 @@ DWORD_PTR CSteamProto:: GetCaps(int type, MCONTACT)
case PFLAGNUM_5:
return PF2_HEAVYDND | PF2_OUTTOLUNCH | PF2_FREECHAT;
case PFLAG_UNIQUEIDTEXT:
- return (DWORD_PTR)Translate("SteamID");
+ return (INT_PTR)Translate("SteamID");
default:
return 0;
}
@@ -341,12 +341,9 @@ HANDLE CSteamProto::GetAwayMsg(MCONTACT hContact)
return (HANDLE)1;
}
-int CSteamProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
+int CSteamProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM)
{
switch (eventType) {
- case EV_PROTO_ONLOAD:
- return OnModulesLoaded(wParam, lParam);
-
case EV_PROTO_ONCONTACTDELETED:
if (IsOnline()) {
MCONTACT hContact = (MCONTACT)wParam;
@@ -356,17 +353,10 @@ int CSteamProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
ptrA sessionId(getStringA("SessionID"));
ptrA steamId(getStringA("SteamID"));
char *who = getStringA(hContact, "SteamID");
- PushRequest(
- new RemoveFriendRequest(token, sessionId, steamId, who),
- &CSteamProto::OnFriendRemoved,
- (void*)who);
+ PushRequest(new RemoveFriendRequest(token, sessionId, steamId, who), &CSteamProto::OnFriendRemoved, (void*)who);
}
}
return 0;
-
- case EV_PROTO_ONMENU:
- //OnInitStatusMenu();
- break;
}
return 1;