medfall

A super great game engine
Log | Files | Refs

commit 02621a2c45989c5ac8dd5480ea2ab3e6954e946c
parent aae6df0a2f07950a4578884b40325986948e77bd
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Thu Aug 31 23:01:14 +0300

More warnings

Diffstat:
renderer.cc | 4++--
renderer.h | 1+
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/renderer.cc b/renderer.cc @@ -203,8 +203,8 @@ UniformBinding renderer_ub_data( const void * data, size_t size, size_t alignmen alignment = max( alignment, ubo_offset_alignment ); UniformBinding binding; - binding.offset = align_power_of_2( uniforms_offset, alignment ); - binding.size = size; + binding.offset = checked_cast< u32 >( align_power_of_2( uniforms_offset, alignment ) ); + binding.size = checked_cast< u32 >( size ); size_t new_uniforms_offset = binding.offset + binding.size; ASSERT( new_uniforms_offset < UNIFORM_BUFFER_SIZE ); diff --git a/renderer.h b/renderer.h @@ -101,6 +101,7 @@ struct FB { }; struct UniformBinding { + // TODO: might be able to make these u16 u32 offset; u32 size; };