Utility/OBJSaver: Remove some warnings

Former-commit-id: 7762f44e85efd99346752899b43d757512eee8fc [formerly 6b86a269f98d9421b60263f2e8435cf14445e469] [formerly ecd111f0499e4659638c11071ae1f472303fa0d9 [formerly d272286ae403222512e8ca9178419094f7da4a0c]]
Former-commit-id: 4211533ae1db2ce95fda5721a0c1050afe3d67f9 [formerly 10f4944022e9fac77060407fd6f05ab40aa20e09]
Former-commit-id: 12747ce9a2c9c3fc2e2b02233d06e9370b18f790
This commit is contained in:
Lynix 2016-09-04 21:00:23 +02:00
parent 8a36442c38
commit da7216a202
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]);