From 4345d540bbc1d8d74556a6a6899bf7d7e0e15823 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: c47426ecb066ecbe830e4cf6851a276745926b57 [formerly 47cf19babea78aa4d5b29b79a7c7d9941088b0bc] [formerly 0288f40d97b0f87d12eaf08e69a16ee7715b0762 [formerly 7b5b6e118e169b4ebfb8dde49bdb810a0f21eb1d]] Former-commit-id: bc9752730450af8e66d24274ae0bacd6217cee56 [formerly 202ce44372bee0be3078342cb0f4751a646539e3] Former-commit-id: cce7de20700fa56f008f510caad71e8adb53e82a --- 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]);