aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bindings/cpp/include/pugl/pugl.hpp6
-rw-r--r--examples/pugl_vulkan_cpp_demo.cpp15
2 files changed, 11 insertions, 10 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));
}
diff --git a/examples/pugl_vulkan_cpp_demo.cpp b/examples/pugl_vulkan_cpp_demo.cpp
index 1a3edda..0b34c81 100644
--- a/examples/pugl_vulkan_cpp_demo.cpp
+++ b/examples/pugl_vulkan_cpp_demo.cpp
@@ -53,7 +53,7 @@ struct PhysicalDeviceSelection {
/// Basic Vulkan context associated with the window
struct VulkanContext {
- VkResult init(pugl::VulkanLoader& loader, const PuglTestOptions& opts);
+ VkResult init(const pugl::VulkanLoader& loader, const PuglTestOptions& opts);
sk::VulkanApi vk;
sk::Instance instance;
@@ -1237,8 +1237,8 @@ createInstance(sk::VulkanInitApi& initApi,
}
VkResult
-getDebugReportCallback(sk::VulkanApi& api,
- sk::Instance& instance,
+getDebugReportCallback(const sk::VulkanApi& api,
+ const sk::Instance& instance,
const bool verbose,
sk::DebugReportCallbackEXT& callback)
{
@@ -1675,7 +1675,8 @@ View::onEvent(const pugl::CloseEvent&)
}
VkResult
-VulkanContext::init(pugl::VulkanLoader& loader, const PuglTestOptions& opts)
+VulkanContext::init(const pugl::VulkanLoader& loader,
+ const PuglTestOptions& opts)
{
VkResult r = VK_SUCCESS;
@@ -1693,9 +1694,9 @@ VulkanContext::init(pugl::VulkanLoader& loader, const PuglTestOptions& opts)
}
int
-run(const char* const programPath,
- const PuglTestOptions opts,
- const size_t numRects)
+run(const char* const programPath,
+ const PuglTestOptions& opts,
+ const size_t numRects)
{
PuglVulkanDemo app{programPath, opts, numRects};