cast use of sizeof

This commit is contained in:
itsmattkc
2019-09-12 03:50:06 +10:00
parent 3818af2449
commit 77bd1d07b3
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -63,7 +63,8 @@ endif()
target_compile_definitions(${OLIVE_TARGET} PRIVATE ${OLIVE_DEFINITIONS})
if(MSVC)
target_compile_options(${OLIVE_TARGET} PRIVATE /W4 /WX)
# Enabling this threw warnings from FFmpeg headers that broke compilation. See if this is fixable.
#target_compile_options(${OLIVE_TARGET} PRIVATE /W4 /WX)
else()
target_compile_options(${OLIVE_TARGET} PRIVATE -Werror -Wuninitialized -pedantic-errors -Wall -Wextra -Wconversion -Wsign-conversion)
endif()
+2 -2
View File
@@ -85,13 +85,13 @@ void olive::gl::Blit(ShaderPtr pipeline, bool flipped, QMatrix4x4 matrix) {
QOpenGLBuffer m_vbo;
m_vbo.create();
m_vbo.bind();
m_vbo.allocate(blit_vertices, 18 * sizeof(GLfloat));
m_vbo.allocate(blit_vertices, 18 * static_cast<int>(sizeof(GLfloat)));
m_vbo.release();
QOpenGLBuffer m_vbo2;
m_vbo2.create();
m_vbo2.bind();
m_vbo2.allocate(flipped ? flipped_blit_texcoords : blit_texcoords, 12 * sizeof(GLfloat));
m_vbo2.allocate(flipped ? flipped_blit_texcoords : blit_texcoords, 12 * static_cast<int>(sizeof(GLfloat)));
m_vbo2.release();
pipeline->bind();