color get_random_respawn_color(std::mt19937& ran_num_gen) noexcept
{
int r = 1 + ran_num_gen()/((ran_num_gen.max() + 1u)/255);
int g = 1 + ran_num_gen()/((ran_num_gen.max() + 1u)/255);
int b = 1 + ran_num_gen()/((ran_num_gen.max() + 1u)/255);
return color(r, g, b);
}
Build gave this error:
C:\Source\game\src\color.cpp:62: error: division by zero [-Werror=div-by-zero]
..\game\src\color.cpp:62:30: error: division by zero [-Werror=div-by-zero]
int b = 1 + ran_num_gen()/((ran_num_gen.max() + 1u)/255);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I saw @TheoPannetier working on this last time. He worked on develop (which is OK: it affects everybody). I'll assign him for now, he can unassign if he thinks I was wrong to do so :-)
In file
color.cpp
, lines 58-65Build gave this error:
Introduced by merging develop into my own branch