Token::getStrLength(): use Token::strValue().

No functional change.
This commit is contained in:
Slava Semushin 2009-09-13 15:03:28 +07:00
parent 1617abf053
commit 13b2edd61e
1 changed files with 1 additions and 9 deletions

View File

@ -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;
}