mirror of
https://github.com/holub/mame
synced 2025-05-25 15:25:33 +03:00
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. (no whatsnew)
This commit is contained in:
parent
c808af4ee4
commit
0bd74f6269
@ -333,8 +333,7 @@ public:
|
|||||||
astring &reset() { return cpy(""); }
|
astring &reset() { return cpy(""); }
|
||||||
astring &expand(int length) { astring_expand(this, length); return *this; }
|
astring &expand(int length) { astring_expand(this, length); return *this; }
|
||||||
|
|
||||||
operator bool() const { return this->text[0] != 0; }
|
operator char *() { return (this->text[0] != 0) ? this->text : NULL; }
|
||||||
operator char *() { return this->text; }
|
|
||||||
operator const char *() const { return astring_c(this); }
|
operator const char *() const { return astring_c(this); }
|
||||||
const char *cstr() const { return astring_c(this); }
|
const char *cstr() const { return astring_c(this); }
|
||||||
int len() const { return astring_len(this); }
|
int len() const { return astring_len(this); }
|
||||||
|
Loading…
Reference in New Issue
Block a user