summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter-patterns.h
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-12 17:59:14 +0100
committerнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-12 20:36:19 +0100
commit9ae21ac6043eda2ee7cb591209a29b473bef41aa (patch)
tree4a684f5ceb6cbb4bce69a09c52059dbd57c19590 /apt-pkg/cachefilter-patterns.h
parent4793c0875dcb82151e1c2d7f38964e738f20f056 (diff)
apt-pkg/cachefilter-patterns.h, apt-pkg/cachefilter-patterns.cc: prepare for APT::StringView -> std::string_view
Diffstat (limited to 'apt-pkg/cachefilter-patterns.h')
-rw-r--r--apt-pkg/cachefilter-patterns.h11
1 files changed, 5 insertions, 6 deletions
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 <apt-pkg/cachefilter.h>
#include <apt-pkg/error.h>
#include <apt-pkg/header-is-private.h>
-#include <apt-pkg/string_view.h>
#include <apt-pkg/strutl.h>
#include <cassert>
#include <iostream>
@@ -59,17 +58,17 @@ struct APT_PUBLIC PatternTreeParser
struct PatternNode : public Node
{
- APT::StringView term;
+ std::string_view term;
std::vector<std::unique_ptr<Node>> 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')