mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-16 12:11:04 -06:00
cmGeneratorExpression: Change Find() parameter type to cm::string_view
This commit is contained in:
@@ -375,14 +375,15 @@ std::string cmGeneratorExpression::Preprocess(const std::string& input,
|
|||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string::size_type cmGeneratorExpression::Find(const std::string& input)
|
cm::string_view::size_type cmGeneratorExpression::Find(
|
||||||
|
const cm::string_view& input)
|
||||||
{
|
{
|
||||||
const std::string::size_type openpos = input.find("$<");
|
const cm::string_view::size_type openpos = input.find("$<");
|
||||||
if (openpos != std::string::npos &&
|
if (openpos != cm::string_view::npos &&
|
||||||
input.find('>', openpos) != std::string::npos) {
|
input.find('>', openpos) != cm::string_view::npos) {
|
||||||
return openpos;
|
return openpos;
|
||||||
}
|
}
|
||||||
return std::string::npos;
|
return cm::string_view::npos;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmGeneratorExpression::IsValidTargetName(const std::string& input)
|
bool cmGeneratorExpression::IsValidTargetName(const std::string& input)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
static void Split(const std::string& input,
|
static void Split(const std::string& input,
|
||||||
std::vector<std::string>& output);
|
std::vector<std::string>& output);
|
||||||
|
|
||||||
static std::string::size_type Find(const std::string& input);
|
static cm::string_view::size_type Find(const cm::string_view& input);
|
||||||
|
|
||||||
static bool IsValidTargetName(const std::string& input);
|
static bool IsValidTargetName(const std::string& input);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user