summaryrefslogtreecommitdiffstats
path: root/Source/cmExpandedCommandArgument.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2018-01-24 12:57:57 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-31 16:04:36 (GMT)
commit901c4a1e05ae7d01dcf4208dfd1b11e1534d4895 (patch)
treedab75963a71f1fa58696582756e558b5803082b5 /Source/cmExpandedCommandArgument.cxx
parent88ed556d99068a5e1bf303e69a156a25fb985bcf (diff)
downloadCMake-901c4a1e05ae7d01dcf4208dfd1b11e1534d4895.zip
CMake-901c4a1e05ae7d01dcf4208dfd1b11e1534d4895.tar.gz
CMake-901c4a1e05ae7d01dcf4208dfd1b11e1534d4895.tar.bz2
cmExpandedCommandArgument: add an overload for const char*
Static string comparisons were causing heap allocations just for a comparison.
Diffstat (limited to 'Source/cmExpandedCommandArgument.cxx')
-rw-r--r--Source/cmExpandedCommandArgument.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmExpandedCommandArgument.cxx b/Source/cmExpandedCommandArgument.cxx
index 0bea65f..1c0a721 100644
--- a/Source/cmExpandedCommandArgument.cxx
+++ b/Source/cmExpandedCommandArgument.cxx
@@ -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;