cmCacheManager: Consify version accessors.

This commit is contained in:
Stephen Kelly 2014-01-21 15:23:27 +01:00
parent 5cc9fb0234
commit 2a6e56e078
3 changed files with 8 additions and 6 deletions

View File

@ -145,8 +145,10 @@ public:
const char* GetCacheValue(const char* key) const;
/** Get the version of CMake that wrote the cache. */
unsigned int GetCacheMajorVersion() { return this->CacheMajorVersion; }
unsigned int GetCacheMinorVersion() { return this->CacheMinorVersion; }
unsigned int GetCacheMajorVersion() const
{ return this->CacheMajorVersion; }
unsigned int GetCacheMinorVersion() const
{ return this->CacheMinorVersion; }
bool NeedCacheCompatibility(int major, int minor);
protected:

View File

@ -169,12 +169,12 @@ void cmMakefile::Initialize()
this->CheckCMP0000 = false;
}
unsigned int cmMakefile::GetCacheMajorVersion()
unsigned int cmMakefile::GetCacheMajorVersion() const
{
return this->GetCacheManager()->GetCacheMajorVersion();
}
unsigned int cmMakefile::GetCacheMinorVersion()
unsigned int cmMakefile::GetCacheMinorVersion() const
{
return this->GetCacheManager()->GetCacheMinorVersion();
}

View File

@ -63,8 +63,8 @@ public:
* was used to write the currently loaded cache, note
* this method will not work before the cache is loaded.
*/
unsigned int GetCacheMajorVersion();
unsigned int GetCacheMinorVersion();
unsigned int GetCacheMajorVersion() const;
unsigned int GetCacheMinorVersion() const;
/* Check for unused variables in this scope */
void CheckForUnusedVariables() const;