Accetta anche NULL nella add delle token strings.
git-svn-id: svn://10.65.10.50/trunk@29 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2fc3fcb138
commit
bd4da82c82
@ -788,9 +788,7 @@ int TToken_string::items() const
|
||||
// Certified 99%
|
||||
void TToken_string::add(const char* s, int pos)
|
||||
{
|
||||
if (s)
|
||||
{
|
||||
if (!*s) s = " ";
|
||||
if (s == NULL || *s == '\0') s = " ";
|
||||
if (pos < 0)
|
||||
{
|
||||
if (not_empty()) *this << _separator;
|
||||
@ -800,12 +798,11 @@ void TToken_string::add(const char* s, int pos)
|
||||
set_item(s, pos);
|
||||
if (_last < 0) _last = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Certified 0%
|
||||
void TToken_string::add(char c, int pos)
|
||||
{
|
||||
char s[2] = { c, 0 };
|
||||
const char s[2] = { c, '\0' };
|
||||
add(s, pos);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user