Fix Cppcheck warning
This commit is contained in:
parent
be4de06a97
commit
8f71e62fd6
|
@ -2628,7 +2628,7 @@ static std::string execute(const Token *start, const Token *end, Data &data)
|
|||
if (!structVal) {
|
||||
// Handle pointer to a struct
|
||||
if (auto structPtr = std::dynamic_pointer_cast<ExprEngine::ArrayValue>(structVal1)) {
|
||||
if (structPtr && structPtr->pointer && !structPtr->data.empty()) {
|
||||
if (structPtr->pointer && !structPtr->data.empty()) {
|
||||
auto indexValue = std::make_shared<ExprEngine::IntRange>("0", 0, 0);
|
||||
for (auto val: structPtr->read(indexValue)) {
|
||||
structVal = std::dynamic_pointer_cast<ExprEngine::StructValue>(val.second);
|
||||
|
|
Loading…
Reference in New Issue