From 48c39ce7f637d67bdfabe1ce5bf35c3856db0ebf Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 3 May 2018 21:25:07 +1000 Subject: [PATCH] build: update for gcc-8.1 warnings --- shader_module.cpp | 4 ++-- tools/hello.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shader_module.cpp b/shader_module.cpp index 7e8dff2..71975d7 100644 --- a/shader_module.cpp +++ b/shader_module.cpp @@ -29,7 +29,7 @@ struct cruft::vk::shader_module::cookie : public create_t { public: cookie (const std::experimental::filesystem::path &src): create_t {}, - m_bytes (util::slurp (src)) + m_bytes (util::slurp (src)) { CHECK_MOD (m_bytes.size (), 4); @@ -39,7 +39,7 @@ public: } private: - std::vector m_bytes; + std::vector m_bytes; }; diff --git a/tools/hello.cpp b/tools/hello.cpp index 060d23f..2d862b6 100644 --- a/tools/hello.cpp +++ b/tools/hello.cpp @@ -772,7 +772,7 @@ main (void) alloc_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; alloc_info.commandPool = command_pool->native (); alloc_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; - alloc_info.commandBufferCount = (uint32_t) command_buffers.size(); + alloc_info.commandBufferCount = util::cast::lossless (command_buffers.size()); cruft::vk::error::try_code ( vkAllocateCommandBuffers (ldevice.native (), &alloc_info, command_buffers.data ()) );