diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-21 12:33:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-21 12:33:31 +0300 |
commit | ca5001026a94f702c4012c5e8d2093ad3f51c1fa (patch) | |
tree | 554ad80633528d530057fc61035b15f901860ed2 /protocols/Omegle/src/proto.cpp | |
parent | e0799755b3966d1d6d8275ee5127242ec029a4e6 (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/Omegle/src/proto.cpp')
-rw-r--r-- | protocols/Omegle/src/proto.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 470a0d70cc..80831a9293 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -79,7 +79,7 @@ OmegleProto::~OmegleProto() //////////////////////////////////////////////////////////////////////////////
-DWORD_PTR OmegleProto::GetCaps(int type, MCONTACT)
+INT_PTR OmegleProto::GetCaps(int type, MCONTACT)
{
switch (type) {
case PFLAGNUM_1:
@@ -91,7 +91,7 @@ DWORD_PTR OmegleProto::GetCaps(int type, MCONTACT) case PFLAG_MAXLENOFMESSAGE:
return OMEGLE_MESSAGE_LIMIT;
case PFLAG_UNIQUEIDTEXT:
- return (DWORD_PTR)Translate("Visible name");
+ return (INT_PTR)Translate("Visible name");
}
return 0;
}
@@ -135,12 +135,6 @@ int OmegleProto::SetStatus(int new_status) int OmegleProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam)
{
switch (event) {
- case EV_PROTO_ONLOAD:
- return OnModulesLoaded(wParam, lParam);
-
- case EV_PROTO_ONEXIT:
- return OnPreShutdown(wParam, lParam);
-
case EV_PROTO_ONCONTACTDELETED:
return OnContactDeleted(wParam, lParam);
}
@@ -157,7 +151,7 @@ INT_PTR OmegleProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam) (HWND)lParam, OmegleAccountProc, (LPARAM)this);
}
-int OmegleProto::OnModulesLoaded(WPARAM, LPARAM)
+void OmegleProto::OnModulesLoaded()
{
// Register group chat
GCREGISTER gcr = {};
@@ -166,8 +160,11 @@ int OmegleProto::OnModulesLoaded(WPARAM, LPARAM) gcr.ptszDispName = m_tszUserName;
gcr.iMaxText = OMEGLE_MESSAGE_LIMIT;
Chat_Register(&gcr);
+}
- return 0;
+void OmegleProto::OnShutdown()
+{
+ SetStatus(ID_STATUS_OFFLINE);
}
int OmegleProto::OnOptionsInit(WPARAM wParam, LPARAM)
@@ -187,12 +184,6 @@ int OmegleProto::OnOptionsInit(WPARAM wParam, LPARAM) return 0;
}
-int OmegleProto::OnPreShutdown(WPARAM, LPARAM)
-{
- SetStatus(ID_STATUS_OFFLINE);
- return 0;
-}
-
int OmegleProto::OnContactDeleted(WPARAM, LPARAM)
{
OnLeaveChat(NULL, NULL);
|