summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-30 13:47:31 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-06-30 13:47:31 (GMT)
commitb399d135683cfffcef727bc1b5bb795f0172036b (patch)
tree27539a2ea5a677b3d319eed72ccfb4477aded2cb /Source
parent0639e23920ee42797aad3900719e5c7f022565b7 (diff)
parent4e8480db5425e0acbbd6394593417aab2a1fc3e5 (diff)
downloadCMake-b399d135683cfffcef727bc1b5bb795f0172036b.zip
CMake-b399d135683cfffcef727bc1b5bb795f0172036b.tar.gz
CMake-b399d135683cfffcef727bc1b5bb795f0172036b.tar.bz2
Merge topic 'CM_OVERRIDE-cmTypeMacro'
4e8480db 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)) { \