summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-09-18 22:49:22 (GMT)
committerBrad King <brad.king@kitware.com>2024-09-20 17:45:46 (GMT)
commit80b469a51de05984c47149ab093d7f2fcf9b9816 (patch)
tree5eba4a6aabea89751722e447bae8409169246a9b /Source
parent3bd73fcc76576b0e0656ca8ba73402d102a1ee30 (diff)
downloadCMake-80b469a51de05984c47149ab093d7f2fcf9b9816.zip
CMake-80b469a51de05984c47149ab093d7f2fcf9b9816.tar.gz
CMake-80b469a51de05984c47149ab093d7f2fcf9b9816.tar.bz2
cmComputeLinkDepends: Factor out string literals as named constants
Diffstat (limited to 'Source')
-rw-r--r--Source/cmComputeLinkDepends.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 1e3b7e9..21bc8ae 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -315,8 +315,10 @@ const LinkLibraryFeatureAttributeSet& GetLinkLibraryFeatureAttributes(
}
// LINK_GROUP helpers
-const auto LG_BEGIN = "<LINK_GROUP:"_s;
-const auto LG_END = "</LINK_GROUP:"_s;
+const cm::string_view LG_BEGIN = "<LINK_GROUP:"_s;
+const cm::string_view LG_END = "</LINK_GROUP:"_s;
+const cm::string_view LG_ITEM_BEGIN = "<LINK_GROUP>"_s;
+const cm::string_view LG_ITEM_END = "</LINK_GROUP>"_s;
inline std::string ExtractGroupFeature(std::string const& item)
{
@@ -488,13 +490,13 @@ public:
if (it == this->FinalEntries.end()) {
break;
}
- it->Item.Value = "</LINK_GROUP>";
+ it->Item.Value = std::string(LG_ITEM_END);
for (auto index = g.second.rbegin(); index != g.second.rend();
++index) {
it = this->FinalEntries.insert(it, this->Entries[*index]);
}
it = this->FinalEntries.insert(it, groupEntry);
- it->Item.Value = "<LINK_GROUP>";
+ it->Item.Value = std::string(LG_ITEM_BEGIN);
}
}
}