Skip to content

Commit 7ccdbf9

Browse files
committed
add explicit casts to supress conversion warning
1 parent 8cf870e commit 7ccdbf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ void Context::glLinkProgram(GLuint program)
8989
GLint max_name_len{};
9090
gl.GetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &max_name_len);
9191

92-
auto uniform_name = std::make_unique<char[]>(max_name_len);
92+
auto uniform_name = std::make_unique<char[]>(static_cast<std::size_t>(max_name_len));
9393

9494
for (int i = 0; i < uniform_count; i++)
9595
{
9696
GLsizei uniform_name_length{};
9797
UniformInfo uniform_info{};
9898
gl.GetActiveUniform(
9999
program,
100-
i,
100+
static_cast<unsigned int>(i),
101101
max_name_len,
102102
&uniform_name_length,
103103
&uniform_info.array_size,

0 commit comments

Comments
 (0)