Fix implicit conversion compiler error in glm/gtc/random.inl
/glm/gtc/random.inl:25:17: error: implicit conversion loses integer precision: 'int' to 'unsigned char' [-Werror,-Wimplicit-int-conversion] std::rand() % std::numeric_limits<uint8>::max()); ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
6ad79aae3e
commit
63a229359e
@ -22,7 +22,7 @@ namespace detail
|
|||||||
GLM_FUNC_QUALIFIER static vec<1, uint8, P> call()
|
GLM_FUNC_QUALIFIER static vec<1, uint8, P> call()
|
||||||
{
|
{
|
||||||
return vec<1, uint8, P>(
|
return vec<1, uint8, P>(
|
||||||
std::rand() % std::numeric_limits<uint8>::max());
|
static_cast<uint8>(std::rand() % std::numeric_limits<uint8>::max()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user