summaryrefslogtreecommitdiff
path: root/src/BRegex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/BRegex.cc')
-rw-r--r--src/BRegex.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/BRegex.cc b/src/BRegex.cc
index c235de6..1ada2f1 100644
--- a/src/BRegex.cc
+++ b/src/BRegex.cc
@@ -1,6 +1,6 @@
#include "BRegex.h"
-Balau::Regex::Regex(const char * regex, bool icase) throw (GeneralException) {
+Balau::Regex::Regex(const char * regex, bool icase) throw (GeneralException) : m_regexStr(regex), m_icase(icase) {
int r = regcomp(&m_regex, regex, REG_EXTENDED | (icase ? REG_ICASE : 0));
if (r)
throw GeneralException(getError(r));
@@ -30,10 +30,6 @@ Balau::Regex::Captures Balau::Regex::match(const char * str) const throw (Genera
return ret;
}
-Balau::Regex::~Regex() {
- regfree(&m_regex);
-}
-
Balau::String Balau::Regex::getError(int err) const {
size_t s;
char * t;