summaryrefslogtreecommitdiffstats
path: root/Source/cmFunctionCommand.cxx
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2012-02-25 06:49:24 (GMT)
committerBrad King <brad.king@kitware.com>2012-02-29 18:27:04 (GMT)
commit737c49a357e7a97b213857fd899081d42f38c143 (patch)
tree7cc345fc263988c6a31bbd610228fe9cf92c80e8 /Source/cmFunctionCommand.cxx
parent261491fe171edb41c2dabce0fd90f282fb11bf6a (diff)
downloadCMake-737c49a357e7a97b213857fd899081d42f38c143.zip
CMake-737c49a357e7a97b213857fd899081d42f38c143.tar.gz
CMake-737c49a357e7a97b213857fd899081d42f38c143.tar.bz2
Add 'const' qualifier to some cmCommand members
Use const_cast for the special case in cmFindBase where GetFullDocumentation calls GenerateDocumentation.
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r--Source/cmFunctionCommand.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index 7a80a1c..ce36145 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -28,7 +28,7 @@ public:
* cmMacroHelperCommand and cmFunctionHelperCommand
* which cannot provide appropriate documentation.
*/
- virtual bool ShouldAppearInDocumentation()
+ virtual bool ShouldAppearInDocumentation() const
{
return false;
}
@@ -49,7 +49,7 @@ public:
/**
* This determines if the command is invoked when in script mode.
*/
- virtual bool IsScriptable() { return true; }
+ virtual bool IsScriptable() const { return true; }
/**
* This is called when the command is first encountered in
@@ -64,12 +64,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
- virtual const char* GetName() { return this->Args[0].c_str(); }
+ virtual const char* GetName() const { return this->Args[0].c_str(); }
/**
* Succinct documentation.
*/
- virtual const char* GetTerseDocumentation()
+ virtual const char* GetTerseDocumentation() const
{
std::string docs = "Function named: ";
docs += this->GetName();
@@ -79,7 +79,7 @@ public:
/**
* More documentation.
*/
- virtual const char* GetFullDocumentation()
+ virtual const char* GetFullDocumentation() const
{
return this->GetTerseDocumentation();
}