diff options
author | David Robillard <d@drobilla.net> | 2021-12-17 15:11:43 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-12-17 15:11:43 -0500 |
commit | ee7078278c0aeb2a41149055ddab1e694f63232b (patch) | |
tree | 6e7ce270357f077ba2be4e712230e02aebe9d390 /bindings | |
parent | c79f6007fa2d60d04f0f754d967fbfce6f09545e (diff) | |
download | pugl-ee7078278c0aeb2a41149055ddab1e694f63232b.tar.gz pugl-ee7078278c0aeb2a41149055ddab1e694f63232b.tar.bz2 pugl-ee7078278c0aeb2a41149055ddab1e694f63232b.zip |
Pass const references where appropriate
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/cpp/include/pugl/pugl.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bindings/cpp/include/pugl/pugl.hpp b/bindings/cpp/include/pugl/pugl.hpp index 0c6065b..98b0108 100644 --- a/bindings/cpp/include/pugl/pugl.hpp +++ b/bindings/cpp/include/pugl/pugl.hpp @@ -89,7 +89,7 @@ struct Event final : Base { /// The `type` field of the corresponding C event structure static constexpr const PuglEventType type = t; - explicit Event(Base base) + explicit Event(const Base& base) : Base{base} {} @@ -453,7 +453,7 @@ public: Rect frame() const noexcept { return puglGetFrame(cobj()); } /// @copydoc puglSetFrame - Status setFrame(Rect frame) noexcept + Status setFrame(const Rect& frame) noexcept { return static_cast<Status>(puglSetFrame(cobj(), frame)); } @@ -541,7 +541,7 @@ public: } /// @copydoc puglPostRedisplayRect - Status postRedisplayRect(const Rect rect) noexcept + Status postRedisplayRect(const Rect& rect) noexcept { return static_cast<Status>(puglPostRedisplayRect(cobj(), rect)); } |