aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-12-17 15:11:43 -0500
committerDavid Robillard <d@drobilla.net>2021-12-17 15:11:43 -0500
commitee7078278c0aeb2a41149055ddab1e694f63232b (patch)
tree6e7ce270357f077ba2be4e712230e02aebe9d390 /examples
parentc79f6007fa2d60d04f0f754d967fbfce6f09545e (diff)
downloadpugl-ee7078278c0aeb2a41149055ddab1e694f63232b.tar.gz
pugl-ee7078278c0aeb2a41149055ddab1e694f63232b.tar.bz2
pugl-ee7078278c0aeb2a41149055ddab1e694f63232b.zip
Pass const references where appropriate
Diffstat (limited to 'examples')
-rw-r--r--examples/pugl_vulkan_cpp_demo.cpp15
1 files changed, 8 insertions, 7 deletions
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};