| 1999 | } |
| 2000 | |
| 2001 | const Token *Token::getValueTokenMaxStrLength() const |
| 2002 | { |
| 2003 | if (!mImpl->mValues) |
| 2004 | return nullptr; |
| 2005 | const Token *ret = nullptr; |
| 2006 | int maxlength = 0; |
| 2007 | for (auto it = mImpl->mValues->cbegin(); it != mImpl->mValues->end(); ++it) { |
| 2008 | if (it->isTokValue() && it->tokvalue && it->tokvalue->tokType() == Token::eString) { |
| 2009 | const int length = getStrLength(it->tokvalue); |
| 2010 | if (!ret || length > maxlength) { |
| 2011 | maxlength = length; |
| 2012 | ret = it->tokvalue; |
| 2013 | } |
| 2014 | } |
| 2015 | } |
| 2016 | return ret; |
| 2017 | } |
| 2018 | |
| 2019 | static bool isAdjacent(const ValueFlow::Value& x, const ValueFlow::Value& y) |
| 2020 | { |
no test coverage detected