diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-27 13:06:36 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-30 22:33:07 (GMT) |
commit | 6aa90237006f1c4556e0cd18ae0e493650e7515c (patch) | |
tree | cf469f40bb650a870699f38cafbfe65e21990230 /Source/cmXCodeObject.cxx | |
parent | 1b60137b98b26866c84ca29aee62031d429f34a5 (diff) | |
download | CMake-6aa90237006f1c4556e0cd18ae0e493650e7515c.zip CMake-6aa90237006f1c4556e0cd18ae0e493650e7515c.tar.gz CMake-6aa90237006f1c4556e0cd18ae0e493650e7515c.tar.bz2 |
string_view: use string_view literals in comparisons
Diffstat (limited to 'Source/cmXCodeObject.cxx')
-rw-r--r-- | Source/cmXCodeObject.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index 73f0992..ddd9669 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -4,6 +4,8 @@ #include <ostream> +#include <cmext/string_view> + #include <CoreFoundation/CoreFoundation.h> const char* cmXCodeObject::PBXTypeNames[] = { @@ -91,13 +93,13 @@ void cmXCodeObject::Print(std::ostream& out) out << this->Id; this->PrintComment(out); out << " = {"; - if (separator == "\n") { + if (separator == "\n"_s) { out << separator; } cmXCodeObject::Indent(3 * indentFactor, out); out << "isa = " << PBXTypeNames[this->IsA] << ";" << separator; for (const auto& keyVal : this->ObjectAttributes) { - if (keyVal.first == "isa") { + if (keyVal.first == "isa"_s) { continue; } @@ -142,7 +144,7 @@ void cmXCodeObject::PrintAttribute(std::ostream& out, int level, case ATTRIBUTE_GROUP: { out << name << " = {"; - if (separator == "\n") { + if (separator == "\n"_s) { out << separator; } for (const auto& keyVal : object->ObjectAttributes) { @@ -156,7 +158,7 @@ void cmXCodeObject::PrintAttribute(std::ostream& out, int level, case OBJECT_REF: { cmXCodeObject::PrintString(out, name); out << " = " << object->Object->Id; - if (object->Object->HasComment() && name != "remoteGlobalIDString") { + if (object->Object->HasComment() && name != "remoteGlobalIDString"_s) { object->Object->PrintComment(out); } out << ";" << separator; |