diff --git a/src/token.cpp b/src/token.cpp index 03c05e468..d12f0682d 100644 --- a/src/token.cpp +++ b/src/token.cpp @@ -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; }