diff --git a/examples/inlineuniformblocks/inlineuniformblocks.cpp b/examples/inlineuniformblocks/inlineuniformblocks.cpp index 9fb0f92e..e67b5337 100644 --- a/examples/inlineuniformblocks/inlineuniformblocks.cpp +++ b/examples/inlineuniformblocks/inlineuniformblocks.cpp @@ -16,7 +16,7 @@ #define ENABLE_VALIDATION false float rnd() { - return ((float)rand() / (RAND_MAX)); + return static_cast(rand()) / static_cast(RAND_MAX); } class VulkanExample : public VulkanExampleBase @@ -392,4 +392,4 @@ public: }; -VULKAN_EXAMPLE_MAIN() \ No newline at end of file +VULKAN_EXAMPLE_MAIN() diff --git a/examples/oit/oit.cpp b/examples/oit/oit.cpp index 98641deb..c67b0a83 100644 --- a/examples/oit/oit.cpp +++ b/examples/oit/oit.cpp @@ -498,7 +498,7 @@ private: vkUpdateDescriptorSets(device, writeDescriptorSets.size(), writeDescriptorSets.data(), 0, NULL); } - void buildCommandBuffers() + void buildCommandBuffers() override { if (resized) return; @@ -639,4 +639,4 @@ private: VkDeviceSize objectUniformBufferSize; }; -VULKAN_EXAMPLE_MAIN() \ No newline at end of file +VULKAN_EXAMPLE_MAIN() diff --git a/examples/pushconstants/pushconstants.cpp b/examples/pushconstants/pushconstants.cpp index 5e34109b..8e544736 100644 --- a/examples/pushconstants/pushconstants.cpp +++ b/examples/pushconstants/pushconstants.cpp @@ -21,7 +21,7 @@ float rnd() { - return ((float) rand() / (RAND_MAX)); + return static_cast(rand()) / static_cast(RAND_MAX); } class VulkanExample : public VulkanExampleBase @@ -293,4 +293,4 @@ public: } }; -VULKAN_EXAMPLE_MAIN() \ No newline at end of file +VULKAN_EXAMPLE_MAIN()