mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix some (MSVC) compiler warnings
This commit is contained in:
parent
695d526764
commit
e1143783e5
8 changed files with 13 additions and 15 deletions
|
@ -25,7 +25,7 @@ constexpr f64 ROUNDING_ERROR_f64 = 0.00000001;
|
|||
#undef PI
|
||||
#endif
|
||||
//! Constant for PI.
|
||||
constexpr f32 PI = M_PI;
|
||||
constexpr f32 PI = static_cast<f32>(M_PI);
|
||||
|
||||
#ifdef PI64 // make sure we don't collide with a define
|
||||
#undef PI64
|
||||
|
|
|
@ -549,12 +549,10 @@ void SelfType::MeshExtractor::deferAddMesh(
|
|||
|
||||
static core::matrix4 loadTransform(const tiniergltf::Node::Matrix &m, SkinnedMesh::SJoint *joint)
|
||||
{
|
||||
// Note: Under the hood, this casts these doubles to floats.
|
||||
core::matrix4 mat = convertHandedness(core::matrix4(
|
||||
m[0], m[1], m[2], m[3],
|
||||
m[4], m[5], m[6], m[7],
|
||||
m[8], m[9], m[10], m[11],
|
||||
m[12], m[13], m[14], m[15]));
|
||||
core::matrix4 mat;
|
||||
for (size_t i = 0; i < m.size(); ++i)
|
||||
mat[i] = static_cast<f32>(m[i]);
|
||||
mat = convertHandedness(mat);
|
||||
|
||||
// Decompose the matrix into translation, scale, and rotation.
|
||||
joint->Animatedposition = mat.getTranslation();
|
||||
|
|
|
@ -166,7 +166,7 @@ public:
|
|||
inline void irrGlObjectLabel(GLenum identifier, GLuint name, const char *label)
|
||||
{
|
||||
if (KHRDebugSupported) {
|
||||
u32 len = strlen(label);
|
||||
u32 len = static_cast<u32>(strlen(label));
|
||||
// Since our texture strings can get quite long we also truncate
|
||||
// to a hardcoded limit of 82
|
||||
len = std::min(len, std::min(MaxLabelLength, 82U));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue