From ee1edc024be849464d18740dca1c9b0c8a01218a Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 4 Sep 2016 21:00:23 +0200 Subject: [PATCH] Utility/OBJSaver: Remove some warnings Former-commit-id: 15c52a8dfcecfe4cfdc27763b3e46c32ac79865f [formerly b0d9a1441ab178753382594b8915dca985787153] [formerly 568cc74817c0d41294ec2dc9afece9cbe9b04db1 [formerly 1b020021b8387298da6ff560a2f93d6ad58bf907]] Former-commit-id: 76f3f5869d13d66490d714fe8ba4dab5e1a2351d [formerly e173b22fb901b3c4597bb6b2054682138e209cc1] Former-commit-id: 11b5bc936031b44b3bea074572cc076ab95e7c7a --- include/Nazara/Core/Bitset.inl | 2 +- src/Nazara/Utility/Formats/OBJSaver.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/Nazara/Core/Bitset.inl b/include/Nazara/Core/Bitset.inl index 21457d7c7..d29315afd 100644 --- a/include/Nazara/Core/Bitset.inl +++ b/include/Nazara/Core/Bitset.inl @@ -121,7 +121,7 @@ namespace Nz if (sizeof(T) <= sizeof(Block)) { m_bitCount = std::numeric_limits::digits; - m_blocks.push_back(value); + m_blocks.push_back(static_cast(value)); } else { diff --git a/src/Nazara/Utility/Formats/OBJSaver.cpp b/src/Nazara/Utility/Formats/OBJSaver.cpp index 534eb1952..6ed15e717 100644 --- a/src/Nazara/Utility/Formats/OBJSaver.cpp +++ b/src/Nazara/Utility/Formats/OBJSaver.cpp @@ -35,12 +35,12 @@ namespace Nz { } - std::size_t GetCount() const + UInt32 GetCount() const { return m_count; } - std::size_t Insert(const T& data) + UInt32 Insert(const T& data) { auto it = m_cache.find(data); if (it == m_cache.end()) @@ -54,8 +54,8 @@ namespace Nz } private: - std::size_t m_count; - std::map m_cache; + UInt32 m_count; + std::map m_cache; T* m_buffer; }; @@ -172,7 +172,7 @@ namespace Nz SparsePtr positionPtr = vertexMapper.GetComponentPtr(VertexComponent_Position); SparsePtr texCoordsPtr = vertexMapper.GetComponentPtr(VertexComponent_TexCoord); - std::size_t faceIndex = 0; + UInt32 faceIndex = 0; TriangleIterator triangle(staticMesh); do { @@ -184,7 +184,7 @@ namespace Nz { OBJParser::FaceVertex& vertexIndices = meshes[i].vertices[face.firstVertex + j]; - std::size_t index = triangle[j]; + UInt32 index = triangle[j]; vertexIndices.normal = normalCache.Insert(normalPtr[index]); vertexIndices.position = positionCache.Insert(positionPtr[index]); vertexIndices.texCoord = texCoordsCache.Insert(texCoordsPtr[index]);