From 8f71e62fd6bd3f39e5a486ed24976bfea12ae81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 13 Dec 2020 16:47:50 +0100 Subject: [PATCH] Fix Cppcheck warning --- lib/exprengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exprengine.cpp b/lib/exprengine.cpp index c8c8f08b3..987b1fd7c 100644 --- a/lib/exprengine.cpp +++ b/lib/exprengine.cpp @@ -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(structVal1)) { - if (structPtr && structPtr->pointer && !structPtr->data.empty()) { + if (structPtr->pointer && !structPtr->data.empty()) { auto indexValue = std::make_shared("0", 0, 0); for (auto val: structPtr->read(indexValue)) { structVal = std::dynamic_pointer_cast(val.second);