mirror of
https://github.com/NixOS/nix
synced 2025-06-28 22:01:15 +02:00
Don't recompile the same regex over and over
This commit is contained in:
parent
104e55bb7f
commit
3b5fa8d50c
2 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "types.hh"
|
||||
#include "regex.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
@ -14,6 +17,9 @@ struct DrvName
|
|||
DrvName();
|
||||
DrvName(const string & s);
|
||||
bool matches(DrvName & n);
|
||||
|
||||
private:
|
||||
std::shared_ptr<Regex> regex;
|
||||
};
|
||||
|
||||
typedef list<DrvName> DrvNames;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue