summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-10-11 18:29:18 -0400
committerDavid Robillard <d@drobilla.net>2024-10-11 18:29:18 -0400
commit07ca96e059ae22420cd3fd3902a989993ec66766 (patch)
treeb4cc24b7c94fc4eb725c5e50f81d72bce58f7c13 /src
parent2e680d433275a1a68db7b44f6c7a27961d1ac49c (diff)
downloadpatchage-07ca96e059ae22420cd3fd3902a989993ec66766.tar.gz
patchage-07ca96e059ae22420cd3fd3902a989993ec66766.tar.bz2
patchage-07ca96e059ae22420cd3fd3902a989993ec66766.zip
Return larger values from accessors by const reference
Diffstat (limited to 'src')
-rw-r--r--src/CanvasModule.hpp2
-rw-r--r--src/CanvasPort.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/CanvasModule.hpp b/src/CanvasModule.hpp
index e15a6b8..e0483cb 100644
--- a/src/CanvasModule.hpp
+++ b/src/CanvasModule.hpp
@@ -52,7 +52,7 @@ public:
CanvasPort* get_port(const PortID& id);
SignalDirection type() const { return _type; }
- ClientID id() const { return _id; }
+ const ClientID& id() const { return _id; }
const std::string& name() const { return _name; }
protected:
diff --git a/src/CanvasPort.hpp b/src/CanvasPort.hpp
index 0fc2f04..b75ecf5 100644
--- a/src/CanvasPort.hpp
+++ b/src/CanvasPort.hpp
@@ -90,7 +90,7 @@ public:
}
PortType type() const { return _type; }
- PortID id() const { return _id; }
+ const PortID& id() const { return _id; }
const std::string& name() const { return _name; }
const std::string& human_name() const { return _human_name; }
const std::optional<int>& order() const { return _order; }