summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-29 07:31:51 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-29 09:48:50 (GMT)
commit4e8480db5425e0acbbd6394593417aab2a1fc3e5 (patch)
treec775170c0a1c33f996441906960040108254bf83 /Source
parentb9b3ec4d98b03c180b2e6b9ad8edba7f75576353 (diff)
downloadCMake-4e8480db5425e0acbbd6394593417aab2a1fc3e5.zip
CMake-4e8480db5425e0acbbd6394593417aab2a1fc3e5.tar.gz
CMake-4e8480db5425e0acbbd6394593417aab2a1fc3e5.tar.bz2
cmTypeMacro: mark overridden functions with CM_OVERRIDE
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTypeMacro.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmTypeMacro.h b/Source/cmTypeMacro.h
index 5c534c3..147eba8 100644
--- a/Source/cmTypeMacro.h
+++ b/Source/cmTypeMacro.h
@@ -15,7 +15,7 @@
// All subclasses of cmCommand or cmCTestGenericHandler should
// invoke this macro.
#define cmTypeMacro(thisClass, superclass) \
- virtual const char* GetNameOfClass() { return #thisClass; } \
+ const char* GetNameOfClass() CM_OVERRIDE { return #thisClass; } \
typedef superclass Superclass; \
static bool IsTypeOf(const char* type) \
{ \
@@ -24,7 +24,10 @@
} \
return Superclass::IsTypeOf(type); \
} \
- virtual bool IsA(const char* type) { return thisClass::IsTypeOf(type); } \
+ bool IsA(const char* type) CM_OVERRIDE \
+ { \
+ return thisClass::IsTypeOf(type); \
+ } \
static thisClass* SafeDownCast(cmObject* c) \
{ \
if (c && c->IsA(#thisClass)) { \