strings: compare to static string_view instances in Windows-only code

This commit is contained in:
Ben Boeckel
2023-07-27 12:23:22 -04:00
parent 7e3b9af191
commit 3f1378fbca
21 changed files with 276 additions and 246 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
#include <utility>
#include <cm/memory>
#include <cmext/string_view>
#include "windows.h"
@@ -204,7 +205,7 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
std::string suffix;
if (cmd.size() > 4) {
suffix = cmSystemTools::LowerCase(cmd.substr(cmd.size() - 4));
if (suffix == ".bat" || suffix == ".cmd") {
if (suffix == ".bat"_s || suffix == ".cmd"_s) {
script += "call ";
}
}