summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/utils.h b/src/utils.h
index e37f37aa..efa203c7 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -171,7 +171,7 @@ void report_memory(std::ostream& out, bool report_all = false);
#else // ! VERIFY_ON
#define VERIFY(x)
-#define DO_VERIFY() true
+#define DO_VERIFY() false
#define TRACE_CTOR(cls, args)
#define TRACE_DTOR(cls)
@@ -278,6 +278,16 @@ extern string empty_string;
strings_list split_arguments(const char * line);
+inline string to_string(long num) {
+ std::ostringstream buf;
+ buf << num;
+ return buf.str();
+}
+
+inline string operator+(const char * left, const string& right) {
+ return string(left) + right;
+}
+
} // namespace ledger
/*@}*/
@@ -353,8 +363,8 @@ inline bool category_matches(const char * cat) {
boost::make_u32regex(_log_category->c_str(),
boost::regex::perl | boost::regex::icase);
#else
- boost::make_regex(_log_category->c_str(),
- boost::regex::perl | boost::regex::icase);
+ boost::regex(_log_category->c_str(),
+ boost::regex::perl | boost::regex::icase);
#endif
}
#if defined(HAVE_BOOST_REGEX_UNICODE)