build: update for gcc-8.1 warnings

This commit is contained in:
Danny Robson 2018-05-03 21:25:07 +10:00
parent 21ba30e4b4
commit 48c39ce7f6
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ struct cruft::vk::shader_module::cookie : public create_t {
public: public:
cookie (const std::experimental::filesystem::path &src): cookie (const std::experimental::filesystem::path &src):
create_t {}, create_t {},
m_bytes (util::slurp (src)) m_bytes (util::slurp<uint32_t> (src))
{ {
CHECK_MOD (m_bytes.size (), 4); CHECK_MOD (m_bytes.size (), 4);
@ -39,7 +39,7 @@ public:
} }
private: private:
std::vector<std::byte> m_bytes; std::vector<uint32_t> m_bytes;
}; };

View File

@ -772,7 +772,7 @@ main (void)
alloc_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; alloc_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
alloc_info.commandPool = command_pool->native (); alloc_info.commandPool = command_pool->native ();
alloc_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; alloc_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
alloc_info.commandBufferCount = (uint32_t) command_buffers.size(); alloc_info.commandBufferCount = util::cast::lossless<uint32_t> (command_buffers.size());
cruft::vk::error::try_code ( cruft::vk::error::try_code (
vkAllocateCommandBuffers (ldevice.native (), &alloc_info, command_buffers.data ()) vkAllocateCommandBuffers (ldevice.native (), &alloc_info, command_buffers.data ())
); );