cmMakefile: Reduce GetModulesFile caller allocations

This commit is contained in:
Brad King
2024-03-06 15:57:27 -05:00
parent 5b2e785431
commit 4d661e3a92
2 changed files with 5 additions and 5 deletions

View File

@@ -3906,8 +3906,8 @@ void cmMakefile::DisplayStatus(const std::string& message, float s) const
#endif #endif
} }
std::string cmMakefile::GetModulesFile(const std::string& filename, std::string cmMakefile::GetModulesFile(cm::string_view filename, bool& system,
bool& system, bool debug, bool debug,
std::string& debugBuffer) const std::string& debugBuffer) const
{ {
std::string result; std::string result;

View File

@@ -803,7 +803,7 @@ public:
/** /**
* Return a location of a file in cmake or custom modules directory * Return a location of a file in cmake or custom modules directory
*/ */
std::string GetModulesFile(const std::string& name) const std::string GetModulesFile(cm::string_view name) const
{ {
bool system; bool system;
std::string debugBuffer; std::string debugBuffer;
@@ -813,13 +813,13 @@ public:
/** /**
* Return a location of a file in cmake or custom modules directory * Return a location of a file in cmake or custom modules directory
*/ */
std::string GetModulesFile(const std::string& name, bool& system) const std::string GetModulesFile(cm::string_view name, bool& system) const
{ {
std::string debugBuffer; std::string debugBuffer;
return this->GetModulesFile(name, system, false, debugBuffer); return this->GetModulesFile(name, system, false, debugBuffer);
} }
std::string GetModulesFile(const std::string& name, bool& system, bool debug, std::string GetModulesFile(cm::string_view name, bool& system, bool debug,
std::string& debugBuffer) const; std::string& debugBuffer) const;
//! Set/Get a property of this directory //! Set/Get a property of this directory