From 12316c9ca2702ec06cda3ef113521e17a756dcce Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 12 Aug 2023 12:34:14 +0100 Subject: Pass ModelPartParam by value, it's just a pointer --- slicer/slicer/modelParts.cpp | 2 +- slicer/slicer/modelParts.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/slicer/slicer/modelParts.cpp b/slicer/slicer/modelParts.cpp index e46d3f7..1b40773 100644 --- a/slicer/slicer/modelParts.cpp +++ b/slicer/slicer/modelParts.cpp @@ -79,7 +79,7 @@ namespace Slicer { } void - HookCommon::apply(const ChildHandler & ch, const ModelPartParam & modelPart) const + HookCommon::apply(const ChildHandler & ch, ModelPartParam modelPart) const { ch(*this->nameStr, modelPart, this); } diff --git a/slicer/slicer/modelParts.h b/slicer/slicer/modelParts.h index 6514c69..979b9f7 100644 --- a/slicer/slicer/modelParts.h +++ b/slicer/slicer/modelParts.h @@ -83,7 +83,7 @@ namespace Slicer { using ModelPartParam = any_ptr; using ModelPartForRootParam = any_ptr; using TypeId = std::optional; - using ChildHandler = std::function; + using ChildHandler = std::function; using ClassRef = std::function; using HookFilter = std::function; using Metadata = MetaData<>; @@ -129,7 +129,7 @@ namespace Slicer { SPECIAL_MEMBERS_DEFAULT(HookCommon); [[nodiscard]] bool filter(const HookFilter & flt) const; - void apply(const ChildHandler & ch, const ModelPartParam & modelPart) const; + void apply(const ChildHandler & ch, ModelPartParam modelPart) const; [[nodiscard]] virtual const Metadata & GetMetadata() const = 0; -- cgit v1.2.3