From 2d4502e643eeb5e81207044d6e3f66537ef40630 Mon Sep 17 00:00:00 2001
From: Christoph Pohl <christoph.pohl@kit.edu>
Date: Wed, 2 Mar 2022 13:38:33 +0100
Subject: [PATCH] Fix wrong generation of enum reset methods in case of it
 being optional

---
 .../codegenerator/codewriter/cpp/generator/enum/IntEnum.cpp   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/RobotAPI/libraries/aron/core/codegenerator/codewriter/cpp/generator/enum/IntEnum.cpp b/source/RobotAPI/libraries/aron/core/codegenerator/codewriter/cpp/generator/enum/IntEnum.cpp
index f27c0cd24..3c9fa87f1 100644
--- a/source/RobotAPI/libraries/aron/core/codegenerator/codewriter/cpp/generator/enum/IntEnum.cpp
+++ b/source/RobotAPI/libraries/aron/core/codegenerator/codewriter/cpp/generator/enum/IntEnum.cpp
@@ -43,7 +43,7 @@ namespace armarx::aron::codegenerator::cpp::generator
     {
         CppBlockPtr block_if_data = std::make_shared<CppBlock>();
         block_if_data->addLine(accessor + nextEl() + "resetSoft();");
-        return block_if_data;
+        return this->resolveMaybeResetSoftBlock(block_if_data, accessor);
     }
 
     CppBlockPtr IntEnum::getResetHardBlock(const std::string& accessor) const
@@ -57,7 +57,7 @@ namespace armarx::aron::codegenerator::cpp::generator
         {
             b->addLine(accessor + nextEl() + "resetHard();");
         }
-        return b;
+        return this->resolveMaybeResetHardBlock(b, accessor);
     }
 
     CppBlockPtr IntEnum::getWriteTypeBlock(const std::string& typeAccessor, const std::string& cppAccessor, const Path& p, std::string& variantAccessor) const
-- 
GitLab