Previous 15994 Revisions Next

r8850 Sunday 22nd August, 2010 at 11:07:49 UTC by Miodrag Milanović
Removed bool operator, and changed operator char *() to return NULL in case of NULL string, which makes if conditions to work properly.
Require full recompile.
[src/lib/util]astring.h

src/lib/util/astring.h
r8849r8850
333333   astring &reset() { return cpy(""); }
334334   astring &expand(int length) { astring_expand(this, length); return *this; }
335335
336   operator bool() const { return this->text[0] != 0; }
337   operator char *() { return this->text; }
336   operator char *() { return (this->text[0] != 0) ? this->text : NULL; }
338337   operator const char *() const { return astring_c(this); }
339338   const char *cstr() const { return astring_c(this); }
340339   int len() const { return astring_len(this); }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team