Fix a lot of warnings from Clang/GCC

This commit is contained in:
Lynix
2016-10-17 14:46:53 +02:00
parent 56498af1a8
commit 5a07bbd001
17 changed files with 18 additions and 33 deletions

View File

@@ -282,7 +282,6 @@ namespace Nz
{
for (auto& pipelinePair : layer.opaqueModels)
{
const MaterialPipeline* pipeline = pipelinePair.first;
auto& pipelineEntry = pipelinePair.second;
if (pipelineEntry.maxInstanceCount > 0)

View File

@@ -431,7 +431,6 @@ namespace Nz
for (auto& matIt : pipelinePair.second.materialMap)
{
const Material* material = matIt.first;
auto& entry = matIt.second;
auto& billboardVector = entry.billboards;
@@ -551,9 +550,7 @@ namespace Nz
const MeshData& meshData = meshIt.first;
auto& meshEntry = meshIt.second;
const Spheref& squaredBoundingSphere = meshEntry.squaredBoundingSphere;
std::vector<Matrix4f>& instances = meshEntry.instances;
if (!instances.empty())
{
const IndexBuffer* indexBuffer = meshData.indexBuffer;

View File

@@ -542,9 +542,7 @@ namespace Nz
auto& overlayMap = matEntry.overlayMap;
for (auto& overlayIt : overlayMap)
{
const Texture* overlay = overlayIt.first;
auto& spriteChainVector = overlayIt.second.spriteChains;
spriteChainVector.clear();
}
@@ -563,9 +561,7 @@ namespace Nz
{
for (auto& materialPair : pipelineEntry.materialMap)
{
const Material* material = materialPair.first;
auto& matEntry = materialPair.second;
if (matEntry.enabled)
{
MeshInstanceContainer& meshInstances = matEntry.meshMap;
@@ -573,7 +569,6 @@ namespace Nz
for (auto& meshIt : meshInstances)
{
auto& meshEntry = meshIt.second;
meshEntry.instances.clear();
}
matEntry.enabled = false;

View File

@@ -508,7 +508,6 @@ namespace Nz
for (auto& matIt : pipelinePair.second.materialMap)
{
const Material* material = matIt.first;
auto& entry = matIt.second;
auto& billboardVector = entry.billboards;

View File

@@ -52,8 +52,8 @@ namespace Nz
}
RigidBody2D::RigidBody2D(RigidBody2D&& object) :
m_geom(std::move(object.m_geom)),
m_shapes(std::move(object.m_shapes)),
m_geom(std::move(object.m_geom)),
m_handle(object.m_handle),
m_world(object.m_world),
m_gravityFactor(object.m_gravityFactor),

View File

@@ -11,7 +11,7 @@
namespace Nz
{
class ContextParameters;
struct ContextParameters;
class ContextImpl
{

View File

@@ -304,7 +304,7 @@ namespace Nz
const Material& mat = pair.second;
Emit("newmtl ");
EmitLine(pair.first);
EmitLine(matName);
EmitLine();
Emit("Ka ");