From 9329e059b2e560cb3222cee8f8fcf0906de2cf73 Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 25 Nov 2011 00:04:05 -0800 Subject: Consts are good. --- src/BRegex.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/BRegex.cc') diff --git a/src/BRegex.cc b/src/BRegex.cc index d3a36f7..c235de6 100644 --- a/src/BRegex.cc +++ b/src/BRegex.cc @@ -6,7 +6,7 @@ Balau::Regex::Regex(const char * regex, bool icase) throw (GeneralException) { throw GeneralException(getError(r)); } -Balau::Regex::Captures Balau::Regex::match(const char * str) throw (GeneralException) { +Balau::Regex::Captures Balau::Regex::match(const char * str) const throw (GeneralException) { Captures ret; regmatch_t * matches = (regmatch_t *) alloca((m_regex.re_nsub + 1) * sizeof(regmatch_t)); @@ -34,7 +34,7 @@ Balau::Regex::~Regex() { regfree(&m_regex); } -Balau::String Balau::Regex::getError(int err) { +Balau::String Balau::Regex::getError(int err) const { size_t s; char * t; @@ -47,5 +47,5 @@ Balau::String Balau::Regex::getError(int err) { return r; } -Balau::Regex Balau::Regexes::any(".*"); -Balau::Regex Balau::Regexes::empty("^$"); +Balau::Regex const Balau::Regexes::any(".*"); +Balau::Regex const Balau::Regexes::empty("^$"); -- cgit v1.2.3