summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefilter-patterns.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/cachefilter-patterns.h')
-rw-r--r--apt-pkg/cachefilter-patterns.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h
index 1714bbb62..660e52e82 100644
--- a/apt-pkg/cachefilter-patterns.h
+++ b/apt-pkg/cachefilter-patterns.h
@@ -16,6 +16,7 @@
#include <cassert>
#include <iostream>
#include <memory>
+#include <optional>
#include <sstream>
#include <string>
#include <vector>
@@ -147,7 +148,7 @@ using namespace APT::CacheFilter;
/** \brief Basic helper class for matching regex */
class BaseRegexMatcher
{
- regex_t *pattern;
+ std::optional<regex_t> pattern;
public:
BaseRegexMatcher(std::string const &string);