From 75157f152132b2d7e352d086ad189dffc089caba Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Mon, 1 Jul 2024 09:48:12 +0200 Subject: [PATCH] Revert return statements --- src/ui/action/handler/antares-study/constraint/create.cpp | 2 +- src/ui/action/handler/antares-study/thermal-cluster/create.cpp | 2 +- src/ui/simulator/windows/output/panel/area-link-renderer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/action/handler/antares-study/constraint/create.cpp b/src/ui/action/handler/antares-study/constraint/create.cpp index 2b5d598741..fe223495e1 100644 --- a/src/ui/action/handler/antares-study/constraint/create.cpp +++ b/src/ui/action/handler/antares-study/constraint/create.cpp @@ -200,7 +200,7 @@ bool Create::performWL(Context& ctx) // ctx.constraint->type(pType); } ctx.autoselectConstraints.push_back(ctx.constraint); - return (ctx.constraint); + return (ctx.constraint != nullptr); } void Create::createActionsForAStandardConstraintCopy(Context&) diff --git a/src/ui/action/handler/antares-study/thermal-cluster/create.cpp b/src/ui/action/handler/antares-study/thermal-cluster/create.cpp index fc88beb15c..6a71b98626 100644 --- a/src/ui/action/handler/antares-study/thermal-cluster/create.cpp +++ b/src/ui/action/handler/antares-study/thermal-cluster/create.cpp @@ -182,7 +182,7 @@ bool Create::performWL(Context& ctx) if (pInfos.behavior == bhOverwrite) (ctx.cluster)->reset(); } - return (ctx.area); + return (ctx.area != nullptr); } return true; } diff --git a/src/ui/simulator/windows/output/panel/area-link-renderer.cpp b/src/ui/simulator/windows/output/panel/area-link-renderer.cpp index 246f767f2a..0f6373334c 100644 --- a/src/ui/simulator/windows/output/panel/area-link-renderer.cpp +++ b/src/ui/simulator/windows/output/panel/area-link-renderer.cpp @@ -174,7 +174,7 @@ int AreaLinkRenderer::height() const bool AreaLinkRenderer::valid() const { - return (pMatrix); + return (nullptr != pMatrix); } wxString AreaLinkRenderer::columnCaption(int colIndx) const