From 7bd3fcae568ba5883d5ab965d2d4d570b31423c6 Mon Sep 17 00:00:00 2001 From: Cody Goodson Date: Mon, 7 Jun 2021 11:51:35 -0500 Subject: [PATCH] Make const. --- src/VkBootstrap.cpp | 2 +- src/VkBootstrap.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index 1624fdd..39ee479 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -1858,7 +1858,7 @@ SwapchainBuilder& SwapchainBuilder::set_allocation_callbacks(VkAllocationCallbac info.allocation_callbacks = callbacks; return *this; } -SwapchainBuilder& SwapchainBuilder::use_dispatch_table(DispatchTable& dispatch_table) { +SwapchainBuilder& SwapchainBuilder::use_dispatch_table(const DispatchTable& dispatch_table) { info.dispatch_table = &dispatch_table; return *this; } diff --git a/src/VkBootstrap.h b/src/VkBootstrap.h index 7b1c0c4..71dfa82 100644 --- a/src/VkBootstrap.h +++ b/src/VkBootstrap.h @@ -715,7 +715,7 @@ class SwapchainBuilder { SwapchainBuilder& set_allocation_callbacks(VkAllocationCallbacks* callbacks); // Provide an optional dispatch table for the builder to use for device pfn's - SwapchainBuilder& use_dispatch_table(DispatchTable& dispatch_table); + SwapchainBuilder& use_dispatch_table(const DispatchTable& dispatch_table); private: void add_desired_formats(std::vector& formats) const; @@ -741,7 +741,7 @@ class SwapchainBuilder { bool clipped = true; VkSwapchainKHR old_swapchain = VK_NULL_HANDLE; VkAllocationCallbacks* allocation_callbacks = VK_NULL_HANDLE; - DispatchTable* dispatch_table = nullptr; + const DispatchTable* dispatch_table = nullptr; } info; };