Fix a shitloads of warnings on VS

Former-commit-id: fca61118f4e0530ed2eaaf9ff96de29806aa5aa8
This commit is contained in:
Lynix
2015-11-25 18:19:26 +01:00
parent c6d16c0128
commit bbe8a776e8
42 changed files with 406 additions and 437 deletions

View File

@@ -379,9 +379,8 @@ namespace Nz
m_vertices[i].current_score = CalculateVertexScore(i);
// calculate scores for all active triangles
float max_score;
float max_score = std::numeric_limits<float>::lowest();
int max_score_tri = -1;
bool first_time = true;
for (unsigned int i = 0; i < m_triangles.size(); ++i)
{
@@ -395,9 +394,8 @@ namespace Nz
m_triangles[i].current_score = sc;
if (first_time || sc > max_score)
if (sc > max_score)
{
first_time = false;
max_score = sc;
max_score_tri = i;
}
@@ -564,8 +562,7 @@ namespace Nz
int PartialScoreRecalculation()
{
// iterate through all the vertices of the cache
bool first_time = true;
float max_score;
float max_score = std::numeric_limits<float>::lowest();
int max_score_tri = -1;
for (unsigned int i = 0; i < 32; ++i)
@@ -588,9 +585,8 @@ namespace Nz
float sc = t->current_score;
// we actually found a triangle to process
if (first_time || sc > max_score)
if (sc > max_score)
{
first_time = false;
max_score = sc;
max_score_tri = tri;
}

View File

@@ -58,7 +58,7 @@ namespace Nz
}
}
void VertexDeclaration::EnableComponent(VertexComponent component, ComponentType type, unsigned int offset)
void VertexDeclaration::EnableComponent(VertexComponent component, ComponentType type, std::size_t offset)
{
#ifdef NAZARA_DEBUG
if (component > VertexComponent_Max)
@@ -91,7 +91,7 @@ namespace Nz
m_stride += Utility::ComponentStride[type];
}
void VertexDeclaration::GetComponent(VertexComponent component, bool* enabled, ComponentType* type, unsigned int* offset) const
void VertexDeclaration::GetComponent(VertexComponent component, bool* enabled, ComponentType* type, std::size_t* offset) const
{
#ifdef NAZARA_DEBUG
if (component > VertexComponent_Max)
@@ -121,12 +121,12 @@ namespace Nz
*offset = vertexComponent.offset;
}
unsigned int VertexDeclaration::GetStride() const
std::size_t VertexDeclaration::GetStride() const
{
return m_stride;
}
void VertexDeclaration::SetStride(unsigned int stride)
void VertexDeclaration::SetStride(std::size_t stride)
{
m_stride = stride;
}