mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 23:19:58 -06:00
cmExpandedCommandArgument: add an overload for const char*
Static string comparisons were causing heap allocations just for a comparison.
This commit is contained in:
@@ -24,6 +24,11 @@ bool cmExpandedCommandArgument::WasQuoted() const
|
||||
return this->Quoted;
|
||||
}
|
||||
|
||||
bool cmExpandedCommandArgument::operator==(const char* value) const
|
||||
{
|
||||
return this->Value == value;
|
||||
}
|
||||
|
||||
bool cmExpandedCommandArgument::operator==(std::string const& value) const
|
||||
{
|
||||
return this->Value == value;
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
|
||||
bool WasQuoted() const;
|
||||
|
||||
bool operator==(const char* value) const;
|
||||
bool operator==(std::string const& value) const;
|
||||
|
||||
bool empty() const;
|
||||
|
||||
Reference in New Issue
Block a user