mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-19 05:30:59 -06:00
Merge topic 'string-prefix'
ec7928ef26use _s to construct static string_views at several places94de927cabVS10Generator: avoid many string allocations8ca2504a4duse string_views to avoid memory allocations761f1adcaecheck for a valid URL scheme before starting to do any splittingef778d77e0replace std::string::substr() with operations that do not allocate memory77616f4681pass cm::string_view to cmVisualStudioSlnParser::ParseTag()ada6a3226fuse cm::string_view for language extension lookups48adc29721replace "std::string::find(x) == 0" with cmHasPrefix() ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4501
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "cmMakefile.h"
|
||||
#include "cmMessageType.h"
|
||||
#include "cmSourceFile.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmXMLParser.h"
|
||||
#include "cmake.h"
|
||||
@@ -2006,7 +2007,7 @@ void cmLocalVisualStudio7Generator::WriteVCProjFooter(
|
||||
fout << "\t<Globals>\n";
|
||||
|
||||
for (std::string const& key : target->GetPropertyKeys()) {
|
||||
if (key.find("VS_GLOBAL_") == 0) {
|
||||
if (cmHasLiteralPrefix(key, "VS_GLOBAL_")) {
|
||||
std::string name = key.substr(10);
|
||||
if (!name.empty()) {
|
||||
/* clang-format off */
|
||||
|
||||
Reference in New Issue
Block a user