summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-08-12 12:34:14 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-08-12 12:34:14 +0100
commit12316c9ca2702ec06cda3ef113521e17a756dcce (patch)
tree7fef915b0a930ea5e2f8c616418a4617ab80c520
parentSimply Sequence get anon child with emplace (diff)
downloadslicer-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.cpp2
-rw-r--r--slicer/slicer/modelParts.h4
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;