summaryrefslogtreecommitdiff
path: root/protocols/Dummy
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/Dummy
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/Dummy')
-rw-r--r--protocols/Dummy/src/dummy_proto.cpp4
-rw-r--r--protocols/Dummy/src/dummy_proto.h16
2 files changed, 7 insertions, 13 deletions
diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp
index c68b687c18..9acb26d22d 100644
--- a/protocols/Dummy/src/dummy_proto.cpp
+++ b/protocols/Dummy/src/dummy_proto.cpp
@@ -87,7 +87,7 @@ int CDummyProto::getTemplateId()
return id;
}
-DWORD_PTR CDummyProto::GetCaps(int type, MCONTACT)
+INT_PTR CDummyProto::GetCaps(int type, MCONTACT)
{
switch(type) {
case PFLAGNUM_1:
@@ -115,7 +115,7 @@ DWORD_PTR CDummyProto::GetCaps(int type, MCONTACT)
if (setting != NULL)
strncpy_s(uniqueIdSetting, setting, _TRUNCATE);
}
- return (DWORD_PTR)uniqueIdSetting;
+ return (INT_PTR)uniqueIdSetting;
}
return 0;
}
diff --git a/protocols/Dummy/src/dummy_proto.h b/protocols/Dummy/src/dummy_proto.h
index 3805467547..c49b17f2d0 100644
--- a/protocols/Dummy/src/dummy_proto.h
+++ b/protocols/Dummy/src/dummy_proto.h
@@ -28,21 +28,15 @@ struct CDummyProto : public PROTO<CDummyProto>
// PROTO_INTERFACE
//====================================================================================
- virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override;
- virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
+ int SendMsg(MCONTACT hContact, int flags, const char* msg) override;
- virtual int __cdecl SetStatus(int iNewStatus);
+ int SetStatus(int iNewStatus) override;
- virtual HANDLE __cdecl SearchBasic(const wchar_t* id);
+ HANDLE SearchBasic(const wchar_t* id) override;
- virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
-
- //==== Events ========================================================================
-
- int __cdecl OnModulesLoaded(WPARAM, LPARAM);
- int __cdecl OnOptionsInit(WPARAM, LPARAM);
- int __cdecl OnPreShutdown(WPARAM, LPARAM);
+ MCONTACT AddToList(int flags, PROTOSEARCHRESULT* psr) override;
//==== Services ======================================================================