diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-12-14 23:00:57 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-12-19 15:17:58 (GMT) |
commit | 218ad35f96e89dc1c311ff52445c8ec03b828d5b (patch) | |
tree | 2fba674ce8c021633127eb29183f7c13f4aef65d /Source/cmStandardIncludes.h | |
parent | 4cb7d792af6bb64d40ed96f028e7df69f2062947 (diff) | |
download | CMake-218ad35f96e89dc1c311ff52445c8ec03b828d5b.zip CMake-218ad35f96e89dc1c311ff52445c8ec03b828d5b.tar.gz CMake-218ad35f96e89dc1c311ff52445c8ec03b828d5b.tar.bz2 |
Constify cmStrCmp.
Diffstat (limited to 'Source/cmStandardIncludes.h')
-rw-r--r-- | Source/cmStandardIncludes.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 7369fe6..eb6e52f 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -423,19 +423,19 @@ struct cmStrCmp { cmStrCmp(const char *test) : m_test(test) {} cmStrCmp(std::string &test) : m_test(test.c_str()) {} - bool operator()(const char * input) + bool operator()(const char * input) const { return strcmp(input, m_test) == 0; } // For use with binary_search - bool operator()(const char *str1, const char *str2) + bool operator()(const char *str1, const char *str2) const { return strcmp(str1, str2) < 0; } private: - const char *m_test; + const char * const m_test; }; #endif |