diff options
author | Alexander Ried <ried@mytum.de> | 2016-10-18T18·21+0200 |
---|---|---|
committer | Alexander Ried <ried@mytum.de> | 2016-10-18T18·22+0200 |
commit | b05b98df7544d02387f583ca5434f33f3e9cb471 (patch) | |
tree | 4f2c923dc552faed3bf2ea1330d4bf68eda80471 /src/libexpr/names.cc | |
parent | ae8884b94975673e6a3338d2c5173c006b4c8d4b (diff) |
replace own regex class with std::regex
Diffstat (limited to 'src/libexpr/names.cc')
-rw-r--r-- | src/libexpr/names.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/names.cc b/src/libexpr/names.cc index 7bca9b6550be..6d78d2116121 100644 --- a/src/libexpr/names.cc +++ b/src/libexpr/names.cc @@ -33,8 +33,8 @@ DrvName::DrvName(const string & s) : hits(0) bool DrvName::matches(DrvName & n) { if (name != "*") { - if (!regex) regex = std::shared_ptr<Regex>(new Regex(name)); - if (!regex->matches(n.name)) return false; + if (!regex) regex = std::unique_ptr<std::regex>(new std::regex(name, std::regex::extended)); + if (!std::regex_match(n.name, *regex)) return false; } if (version != "" && version != n.version) return false; return true; |