| 1979 | } |
| 1980 | |
| 1981 | const Token *Token::getValueTokenMinStrSize(const Settings &settings, MathLib::bigint* path) const |
| 1982 | { |
| 1983 | if (!mImpl->mValues) |
| 1984 | return nullptr; |
| 1985 | const Token *ret = nullptr; |
| 1986 | int minsize = INT_MAX; |
| 1987 | for (auto it = mImpl->mValues->begin(); it != mImpl->mValues->end(); ++it) { |
| 1988 | if (it->isTokValue() && it->tokvalue && it->tokvalue->tokType() == Token::eString) { |
| 1989 | const int size = getStrSize(it->tokvalue, settings); |
| 1990 | if (!ret || size < minsize) { |
| 1991 | minsize = size; |
| 1992 | ret = it->tokvalue; |
| 1993 | if (path) |
| 1994 | *path = it->path; |
| 1995 | } |
| 1996 | } |
| 1997 | } |
| 1998 | return ret; |
| 1999 | } |
| 2000 | |
| 2001 | const Token *Token::getValueTokenMaxStrLength() const |
| 2002 | { |
no test coverage detected