From 2e5d1990f382aa42e8a0ad34117ee1e5a9187153 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 8 Oct 2016 12:21:35 +0200 Subject: Ninja: Constify --- Source/cmGlobalNinjaGenerator.cxx | 6 ++++-- Source/cmGlobalNinjaGenerator.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index f5a0e68..adb5a95 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -830,7 +830,8 @@ static void EnsureTrailingSlash(std::string& path) #endif } -std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path) +std::string cmGlobalNinjaGenerator::ConvertToNinjaPath( + const std::string& path) const { cmLocalNinjaGenerator* ng = static_cast(this->LocalGenerators[0]); @@ -1421,7 +1422,8 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix() EnsureTrailingSlash(this->OutputPathPrefix); } -std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path) +std::string cmGlobalNinjaGenerator::NinjaOutputPath( + std::string const& path) const { if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) { return path; diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index dcf7406..5064b21 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -233,7 +233,7 @@ public: return this->RulesFileStream; } - std::string ConvertToNinjaPath(const std::string& path); + std::string ConvertToNinjaPath(const std::string& path) const; std::string ConvertToNinjaFolderRule(const std::string& path); struct MapToNinjaPathImpl @@ -333,7 +333,7 @@ public: bool SupportsConsolePool() const; bool SupportsImplicitOuts() const; - std::string NinjaOutputPath(std::string const& path); + std::string NinjaOutputPath(std::string const& path) const; bool HasOutputPathPrefix() const { return !this->OutputPathPrefix.empty(); } void StripNinjaOutputPathPrefixAsSuffix(std::string& path); -- cgit v0.12