lib/icu/Collate: pass std::string_view

This commit is contained in:
Max Kellermann
2020-04-03 15:41:09 +02:00
parent e620677d7c
commit 91c75a133f
4 changed files with 17 additions and 13 deletions

View File

@@ -199,7 +199,7 @@ gcc_pure
static bool
directory_cmp(const Directory &a, const Directory &b) noexcept
{
return IcuCollate(a.path.c_str(), b.path.c_str()) < 0;
return IcuCollate(a.path, b.path) < 0;
}
void

View File

@@ -96,7 +96,7 @@ song_cmp(const Song &a, const Song &b) noexcept
return ret < 0;
/* still no difference? compare file name */
return IcuCollate(a.filename.c_str(), b.filename.c_str()) < 0;
return IcuCollate(a.filename, b.filename) < 0;
}
void