Use ledger::string only if VERIFY_ON or BOOST_PYTHON

This commit is contained in:
John Wiegley 2009-11-11 18:02:47 -05:00
parent a8bc4728fe
commit 31f85cc803
2 changed files with 12 additions and 0 deletions

View file

@ -417,6 +417,8 @@ void report_memory(std::ostream& out, bool report_all)
namespace ledger { namespace ledger {
#if defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)
string::string() : std::string() { string::string() : std::string() {
TRACE_CTOR(string, ""); TRACE_CTOR(string, "");
} }
@ -453,6 +455,8 @@ string::~string() throw() {
TRACE_DTOR(string); TRACE_DTOR(string);
} }
#endif // defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)
string empty_string(""); string empty_string("");
strings_list split_arguments(const char * line) strings_list split_arguments(const char * line)

View file

@ -181,6 +181,8 @@ void report_memory(std::ostream& out, bool report_all = false);
namespace ledger { namespace ledger {
#if defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)
class string : public std::string class string : public std::string
{ {
public: public:
@ -253,6 +255,12 @@ inline bool operator!=(const char* __lhs, const string& __rhs)
inline bool operator!=(const string& __lhs, const char* __rhs) inline bool operator!=(const string& __lhs, const char* __rhs)
{ return __lhs.compare(__rhs) != 0; } { return __lhs.compare(__rhs) != 0; }
#else // defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)
typedef std::string string;
#endif // defined(VERIFY_ON) || defined(HAVE_BOOST_PYTHON)
extern string empty_string; extern string empty_string;
strings_list split_arguments(const char * line); strings_list split_arguments(const char * line);