Commit 2e5d1990 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

Ninja: Constify

parent b3701f9a
Pipeline #30063 passed with stage
......@@ -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<cmLocalNinjaGenerator*>(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;
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment