From ee7078278c0aeb2a41149055ddab1e694f63232b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 17 Dec 2021 15:11:43 -0500 Subject: Pass const references where appropriate --- bindings/cpp/include/pugl/pugl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bindings/cpp') 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(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(puglPostRedisplayRect(cobj(), rect)); } -- cgit v1.2.1