mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-25 00:59:19 -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:
@@ -1778,7 +1778,7 @@ private:
|
||||
const std::string& testDir)
|
||||
{
|
||||
// First check if the test directory "starts with" the base directory:
|
||||
if (testDir.find(baseDir) != 0) {
|
||||
if (!cmHasPrefix(testDir, baseDir)) {
|
||||
return false;
|
||||
}
|
||||
// If it does, then check that it's either the same string, or that the
|
||||
|
||||
Reference in New Issue
Block a user