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
This commit is contained in:
Lynix 2016-09-04 21:00:23 +02:00
parent 2674937384
commit 4345d540bb
2 changed files with 7 additions and 7 deletions

View File

@ -121,7 +121,7 @@ namespace Nz
if (sizeof(T) <= sizeof(Block)) if (sizeof(T) <= sizeof(Block))
{ {
m_bitCount = std::numeric_limits<T>::digits; m_bitCount = std::numeric_limits<T>::digits;
m_blocks.push_back(value); m_blocks.push_back(static_cast<Block>(value));
} }
else else
{ {

View File

@ -35,12 +35,12 @@ namespace Nz
{ {
} }
std::size_t GetCount() const UInt32 GetCount() const
{ {
return m_count; return m_count;
} }
std::size_t Insert(const T& data) UInt32 Insert(const T& data)
{ {
auto it = m_cache.find(data); auto it = m_cache.find(data);
if (it == m_cache.end()) if (it == m_cache.end())
@ -54,8 +54,8 @@ namespace Nz
} }
private: private:
std::size_t m_count; UInt32 m_count;
std::map<T, std::size_t> m_cache; std::map<T, UInt32> m_cache;
T* m_buffer; T* m_buffer;
}; };
@ -172,7 +172,7 @@ namespace Nz
SparsePtr<Vector3f> positionPtr = vertexMapper.GetComponentPtr<Vector3f>(VertexComponent_Position); SparsePtr<Vector3f> positionPtr = vertexMapper.GetComponentPtr<Vector3f>(VertexComponent_Position);
SparsePtr<Vector2f> texCoordsPtr = vertexMapper.GetComponentPtr<Vector2f>(VertexComponent_TexCoord); SparsePtr<Vector2f> texCoordsPtr = vertexMapper.GetComponentPtr<Vector2f>(VertexComponent_TexCoord);
std::size_t faceIndex = 0; UInt32 faceIndex = 0;
TriangleIterator triangle(staticMesh); TriangleIterator triangle(staticMesh);
do do
{ {
@ -184,7 +184,7 @@ namespace Nz
{ {
OBJParser::FaceVertex& vertexIndices = meshes[i].vertices[face.firstVertex + j]; 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.normal = normalCache.Insert(normalPtr[index]);
vertexIndices.position = positionCache.Insert(positionPtr[index]); vertexIndices.position = positionCache.Insert(positionPtr[index]);
vertexIndices.texCoord = texCoordsCache.Insert(texCoordsPtr[index]); vertexIndices.texCoord = texCoordsCache.Insert(texCoordsPtr[index]);