Fix some warnings from MSVC

This commit is contained in:
Lynix
2016-11-10 16:44:29 +01:00
parent 8ed34d22fb
commit 7f445def13
19 changed files with 96 additions and 97 deletions

View File

@@ -87,7 +87,7 @@ namespace Nz
struct SpriteChain_XYZ_Color_UV
{
const VertexStruct_XYZ_Color_UV* vertices;
unsigned int spriteCount;
std::size_t spriteCount;
};
struct BatchedSpriteEntry
@@ -160,7 +160,7 @@ namespace Nz
const Material* material;
};
typedef std::vector<unsigned int> TransparentModelContainer;
typedef std::vector<std::size_t> TransparentModelContainer;
struct Layer
{

View File

@@ -36,10 +36,10 @@ namespace Nz
~ParticleDeclaration();
void DisableComponent(ParticleComponent component);
void EnableComponent(ParticleComponent component, ComponentType type, unsigned int offset);
void EnableComponent(ParticleComponent component, ComponentType type, std::size_t offset);
void GetComponent(ParticleComponent component, bool* enabled, ComponentType* type, unsigned int* offset) const;
unsigned int GetStride() const;
void GetComponent(ParticleComponent component, bool* enabled, ComponentType* type, std::size_t* offset) const;
std::size_t GetStride() const;
void SetStride(unsigned int stride);
@@ -60,7 +60,7 @@ namespace Nz
{
ComponentType type;
bool enabled = false;
unsigned int offset;
std::size_t offset;
/*
** -Lynix:
@@ -71,7 +71,7 @@ namespace Nz
};
std::array<Component, ParticleComponent_Max + 1> m_components;
unsigned int m_stride;
std::size_t m_stride;
static std::array<ParticleDeclaration, ParticleLayout_Max + 1> s_declarations;
static ParticleDeclarationLibrary::LibraryMap s_library;

View File

@@ -28,12 +28,12 @@ namespace Nz
void EnableLagCompensation(bool enable);
unsigned int GetEmissionCount() const;
std::size_t GetEmissionCount() const;
float GetEmissionRate() const;
bool IsLagCompensationEnabled() const;
void SetEmissionCount(unsigned int count);
void SetEmissionCount(std::size_t count);
void SetEmissionRate(float rate);
ParticleEmitter& operator=(const ParticleEmitter& emitter) = default;
@@ -49,7 +49,7 @@ namespace Nz
bool m_lagCompensationEnabled;
mutable float m_emissionAccumulator;
float m_emissionRate;
unsigned int m_emissionCount;
std::size_t m_emissionCount;
};
}

View File

@@ -45,11 +45,11 @@ namespace Nz
void* GenerateParticles(unsigned int count);
const ParticleDeclarationConstRef& GetDeclaration() const;
unsigned int GetMaxParticleCount() const;
unsigned int GetParticleCount() const;
unsigned int GetParticleSize() const;
std::size_t GetMaxParticleCount() const;
std::size_t GetParticleCount() const;
std::size_t GetParticleSize() const;
void KillParticle(unsigned int index);
void KillParticle(std::size_t index);
void KillParticles();
void RemoveController(ParticleController* controller);
@@ -81,6 +81,9 @@ namespace Nz
};
std::set<unsigned int, std::greater<unsigned int>> m_dyingParticles;
std::size_t m_maxParticleCount;
std::size_t m_particleCount;
std::size_t m_particleSize;
mutable std::vector<UInt8> m_buffer;
std::vector<ParticleControllerRef> m_controllers;
std::vector<EmitterEntry> m_emitters;
@@ -88,9 +91,6 @@ namespace Nz
ParticleDeclarationConstRef m_declaration;
ParticleRendererRef m_renderer;
bool m_processing;
unsigned int m_maxParticleCount;
unsigned int m_particleCount;
unsigned int m_particleSize;
};
}

View File

@@ -29,7 +29,7 @@ namespace Nz
static AbstractRenderTechnique* GetByName(const String& name, int* techniqueRanking = nullptr);
static AbstractRenderTechnique* GetByRanking(int maxRanking, int* techniqueRanking = nullptr);
static unsigned int GetCount();
static std::size_t GetCount();
static void Register(const String& name, int ranking, RenderTechniqueFactory factory);