From c3555eb137055d06b5d1085d7b9d5c34f0428c21 Mon Sep 17 00:00:00 2001 From: MNikoliCC Date: Wed, 11 Dec 2024 13:15:28 +0100 Subject: [PATCH] Fix --- .github/workflows/tests_sources_with_latest_cppcheck.yml | 4 ++++ src/webots/nodes/WbRobot.cpp | 2 +- src/wren/Node.hpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests_sources_with_latest_cppcheck.yml b/.github/workflows/tests_sources_with_latest_cppcheck.yml index fbef60e4d70..3f2365acc13 100644 --- a/.github/workflows/tests_sources_with_latest_cppcheck.yml +++ b/.github/workflows/tests_sources_with_latest_cppcheck.yml @@ -1,6 +1,10 @@ name: Test Sources with Latest Cppcheck on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + branches-ignore: + - 'released' schedule: - cron: '0 22 * * *' diff --git a/src/webots/nodes/WbRobot.cpp b/src/webots/nodes/WbRobot.cpp index 68c51162d55..4bf24b65483 100644 --- a/src/webots/nodes/WbRobot.cpp +++ b/src/webots/nodes/WbRobot.cpp @@ -271,7 +271,7 @@ void WbRobot::addDevices(WbNode *node) { return; const WbRobot *robotNode = dynamic_cast(node); - if (node != this && robrobotNodeot) + if (node != this && robotNode) return; // do not recurse through child robots, their devices are hidden WbGroup *group = dynamic_cast(node); diff --git a/src/wren/Node.hpp b/src/wren/Node.hpp index 810bab04678..63779814fda 100644 --- a/src/wren/Node.hpp +++ b/src/wren/Node.hpp @@ -55,7 +55,7 @@ namespace wren { protected: Node(); - explicit Node(Node *source); + explicit Node(const Node *source); virtual ~Node() {} virtual void recomputeAabb() const;