From 9ae21ac6043eda2ee7cb591209a29b473bef41aa Mon Sep 17 00:00:00 2001 From: наб Date: Tue, 12 Nov 2024 17:59:14 +0100 Subject: apt-pkg/cachefilter-patterns.h, apt-pkg/cachefilter-patterns.cc: prepare for APT::StringView -> std::string_view --- apt-pkg/cachefilter-patterns.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'apt-pkg/cachefilter-patterns.h') diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h index 1f2f4f781..a45b9afcf 100644 --- a/apt-pkg/cachefilter-patterns.h +++ b/apt-pkg/cachefilter-patterns.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -59,17 +58,17 @@ struct APT_PUBLIC PatternTreeParser struct PatternNode : public Node { - APT::StringView term; + std::string_view term; std::vector> arguments; bool haveArgumentList = false; APT_HIDDEN std::ostream &render(std::ostream &stream) override; - APT_HIDDEN bool matches(APT::StringView name, int min, int max); + APT_HIDDEN bool matches(std::string_view name, int min, int max); }; struct WordNode : public Node { - APT::StringView word; + std::string_view word; bool quoted = false; APT_HIDDEN std::ostream &render(std::ostream &stream) override; }; @@ -79,10 +78,10 @@ struct APT_PUBLIC PatternTreeParser size_t offset = 0; }; - APT::StringView sentence; + std::string_view sentence; State state; - PatternTreeParser(APT::StringView sentence) : sentence(sentence){}; + PatternTreeParser(std::string_view sentence) : sentence(sentence){}; off_t skipSpace() { while (sentence[state.offset] == ' ' || sentence[state.offset] == '\t' || sentence[state.offset] == '\r' || sentence[state.offset] == '\n') -- cgit v1.2.3-70-g09d2