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

View File

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

View File

@ -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<T, std::size_t> m_cache;
UInt32 m_count;
std::map<T, UInt32> m_cache;
T* m_buffer;
};
@ -172,7 +172,7 @@ namespace Nz
SparsePtr<Vector3f> positionPtr = vertexMapper.GetComponentPtr<Vector3f>(VertexComponent_Position);
SparsePtr<Vector2f> texCoordsPtr = vertexMapper.GetComponentPtr<Vector2f>(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]);