diff --git a/meson.build b/meson.build index 6784e09..435f96e 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project('pkgfile', 'cpp', version : '21', license : 'MIT', default_options : [ - 'cpp_std=c++17', + 'cpp_std=c++20', 'warning_level=3', 'prefix=/usr', ]) diff --git a/src/filter.cc b/src/filter.cc index e0d7c69..7dfbc20 100644 --- a/src/filter.cc +++ b/src/filter.cc @@ -7,7 +7,7 @@ namespace pkgfile { namespace filter { bool Directory::Matches(std::string_view line) const { - return !line.empty() && line.back() == '/'; + return line.ends_with('/'); } bool Bin::Matches(std::string_view line) const {