mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03:00
cmExpandedCommandArgument: add an overload for const char*
Static string comparisons were causing heap allocations just for a comparison.
This commit is contained in:
1 parent
88ed556d99
commit
901c4a1e05
2 files changed
+6
No files matched your search
@@ -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