diff options
Diffstat (limited to 'ledger.cc')
-rw-r--r-- | ledger.cc | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -4,7 +4,6 @@ namespace ledger { -bool use_warnings = false; book * main_ledger; commodity::~commodity() @@ -251,6 +250,15 @@ mask::mask(const std::string& pat) : exclude(false) << std::endl; } +mask::mask(const mask& m) : exclude(m.exclude), pattern(m.pattern) +{ + const char *error; + int erroffset; + regexp = pcre_compile(pattern.c_str(), PCRE_CASELESS, + &error, &erroffset, NULL); + assert(regexp); +} + void read_regexps(const std::string& path, regexps_map& regexps) { if (access(path.c_str(), R_OK) != -1) { |