diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/.clang-tidy | 1 | ||||
-rw-r--r-- | examples/pugl_vulkan_cpp_demo.cpp | 10 | ||||
-rw-r--r-- | examples/sybok.hpp | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/examples/.clang-tidy b/examples/.clang-tidy index bf9899a..819a16d 100644 --- a/examples/.clang-tidy +++ b/examples/.clang-tidy @@ -21,7 +21,6 @@ Checks: > -fuchsia-default-arguments, -fuchsia-default-arguments-calls, -fuchsia-overloaded-operator, - -google-readability-casting, -google-runtime-references, -hicpp-multiway-paths-covered, -hicpp-no-array-decay, diff --git a/examples/pugl_vulkan_cpp_demo.cpp b/examples/pugl_vulkan_cpp_demo.cpp index c901de5..7e0bd38 100644 --- a/examples/pugl_vulkan_cpp_demo.cpp +++ b/examples/pugl_vulkan_cpp_demo.cpp @@ -272,7 +272,7 @@ selectPresentMode(const sk::VulkanApi& vk, return r; } - const auto& tryModes = priorities[bool(multiBuffer)][bool(sync)]; + const auto& tryModes = priorities[multiBuffer][sync]; for (const auto m : tryModes) { if (std::find(modes.begin(), modes.end(), m) != modes.end()) { presentMode = m; @@ -896,8 +896,8 @@ RectPipeline::init(const sk::VulkanApi& vk, const VkViewport viewport{0.0f, 0.0f, - float(swapchain.extent.width), - float(swapchain.extent.height), + static_cast<float>(swapchain.extent.width), + static_cast<float>(swapchain.extent.height), 0.0f, 1.0f}; @@ -1560,9 +1560,9 @@ update(PuglVulkanDemo& app, const double time) UniformBufferObject ubo = {{}}; mat4Ortho(ubo.projection, 0.0f, - float(app.renderer.swapchain.extent.width), + static_cast<float>(app.renderer.swapchain.extent.width), 0.0f, - float(app.renderer.swapchain.extent.height), + static_cast<float>(app.renderer.swapchain.extent.height), -1.0f, 1.0f); diff --git a/examples/sybok.hpp b/examples/sybok.hpp index 568e581..aad1b41 100644 --- a/examples/sybok.hpp +++ b/examples/sybok.hpp @@ -777,7 +777,7 @@ public: } if (!vkDestroyInstance) { - vkDestroyInstance = PFN_vkDestroyInstance( + vkDestroyInstance = reinterpret_cast<PFN_vkDestroyInstance>( getInstanceProcAddr(instance, "vkDestroyInstance")); } |