diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-08-12 12:34:14 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-08-12 12:34:14 +0100 |
commit | 12316c9ca2702ec06cda3ef113521e17a756dcce (patch) | |
tree | 7fef915b0a930ea5e2f8c616418a4617ab80c520 | |
parent | Simply Sequence get anon child with emplace (diff) | |
download | slicer-12316c9ca2702ec06cda3ef113521e17a756dcce.tar.bz2 slicer-12316c9ca2702ec06cda3ef113521e17a756dcce.tar.xz slicer-12316c9ca2702ec06cda3ef113521e17a756dcce.zip |
Pass ModelPartParam by value, it's just a pointer
-rw-r--r-- | slicer/slicer/modelParts.cpp | 2 | ||||
-rw-r--r-- | 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<ModelPart>; using ModelPartForRootParam = any_ptr<ModelPartForRootBase>; using TypeId = std::optional<std::string>; - using ChildHandler = std::function<void(const std::string &, const ModelPartParam &, const HookCommon *)>; + using ChildHandler = std::function<void(const std::string &, ModelPartParam, const HookCommon *)>; using ClassRef = std::function<ModelPartPtr(void *)>; using HookFilter = std::function<bool(const HookCommon *)>; 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; |