Token::getStrLength(): use Token::strValue().
No functional change.
This commit is contained in:
parent
1617abf053
commit
13b2edd61e
|
@ -504,10 +504,7 @@ size_t Token::getStrLength(const Token *tok)
|
|||
assert(tok != NULL);
|
||||
|
||||
size_t len = 0;
|
||||
const char *str = tok->strAt(0);
|
||||
|
||||
assert(str[0] == '"');
|
||||
assert(str[strlen(str)-1] == '"');
|
||||
const char *str = tok->strValue().c_str();
|
||||
|
||||
while (*str)
|
||||
{
|
||||
|
@ -517,11 +514,6 @@ size_t Token::getStrLength(const Token *tok)
|
|||
++len;
|
||||
}
|
||||
|
||||
assert(len >= 2);
|
||||
|
||||
// don't count quotes
|
||||
len -= 2;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue