Przeglądaj źródła

Fix member var init order warnings on OS X

Nur Monson 12 lat temu
rodzic
commit
faa12ac8ed

+ 4 - 4
Core/Contents/Source/PolyParticleEmitter.cpp

@@ -36,8 +36,8 @@
 using namespace Polycode;
 
 SceneParticleEmitter::SceneParticleEmitter(const String& materialName, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation, Vector3 emitterRadius, Mesh *particleMesh, SceneMesh *emitter)
-: ParticleEmitter(materialName, particleMesh, particleType, emitterType, lifespan, numParticles,  direction, gravity, deviation, emitterRadius),
-SceneEntity()
+: SceneEntity(),
+ParticleEmitter(materialName, particleMesh, particleType, emitterType, lifespan, numParticles,  direction, gravity, deviation, emitterRadius)
 {
 	isScreenEmitter = false;
 	emitterMesh = emitter;	
@@ -80,8 +80,8 @@ void SceneParticleEmitter::Update() {
 
 
 ScreenParticleEmitter::ScreenParticleEmitter(const String& imageFile, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation, Vector3 emitterRadius, Mesh *particleMesh, ScreenMesh *emitter)
-		: ParticleEmitter(imageFile, particleMesh, particleType, emitterType, lifespan, numParticles,  direction, gravity, deviation, emitterRadius),
-ScreenEntity()
+		: ScreenEntity(),
+ParticleEmitter(imageFile, particleMesh, particleType, emitterType, lifespan, numParticles,  direction, gravity, deviation, emitterRadius)
 {
 	particleSize = 10.0; 
 	isScreenEmitter = true;

+ 1 - 1
Core/Contents/Source/PolyRenderer.cpp

@@ -25,7 +25,7 @@
 
 using namespace Polycode;
 
-Renderer::Renderer() : currentTexture(NULL), xRes(0), yRes(0), renderMode(0), orthoMode(false), lightingEnabled(false), clearColor(0.2f, 0.2f, 0.2f, 0.0) {
+Renderer::Renderer() : clearColor(0.2f, 0.2f, 0.2f, 0.0), currentTexture(NULL), renderMode(0), lightingEnabled(false), orthoMode(false), xRes(0), yRes(0) {
 	anisotropy = 0;
 	textureFilteringMode = TEX_FILTERING_LINEAR;
 	currentMaterial = NULL;

+ 3 - 3
Core/Contents/Source/PolyScreenMesh.cpp

@@ -29,7 +29,7 @@
 
 using namespace Polycode;
 
-ScreenMesh::ScreenMesh(Mesh *mesh) : ScreenEntity(), texture(NULL), material(NULL) {
+ScreenMesh::ScreenMesh(Mesh *mesh) : ScreenEntity(), material(NULL), texture(NULL) {
 	this->mesh = mesh;
 	lineSmooth = false;
 	lineWidth = 1.0;
@@ -37,14 +37,14 @@ ScreenMesh::ScreenMesh(Mesh *mesh) : ScreenEntity(), texture(NULL), material(NUL
 	updateHitBox();
 }
 
-ScreenMesh::ScreenMesh(const String& fileName) : ScreenEntity(), texture(NULL), material(NULL) {
+ScreenMesh::ScreenMesh(const String& fileName) : ScreenEntity(), material(NULL), texture(NULL) {
 	mesh = new Mesh(fileName);
 	lineSmooth = false;
 	lineWidth = 1.0;
 	
 }
 
-ScreenMesh::ScreenMesh(int meshType) : ScreenEntity(), texture(NULL), material(NULL){
+ScreenMesh::ScreenMesh(int meshType) : ScreenEntity(), material(NULL), texture(NULL) {
 	mesh = new Mesh(meshType);
 	lineSmooth = false;
 	lineWidth = 1.0;

+ 2 - 2
Core/Contents/Source/PolySound.cpp

@@ -55,7 +55,7 @@ long custom_tellfunc(void *datasource) {
 	return OSBasics::tell(file);
 }
 
-Sound::Sound(const String& fileName) : sampleLength(-1), volume(1),pitch(1),referenceDistance(1),maxDistance(MAX_FLOAT) {
+Sound::Sound(const String& fileName) :  referenceDistance(1), maxDistance(MAX_FLOAT), pitch(1), volume(1), sampleLength(-1) {
 	checkALError("Construct: Loose error before construction");
 	soundLoaded = false;	
 
@@ -66,7 +66,7 @@ Sound::Sound(const String& fileName) : sampleLength(-1), volume(1),pitch(1),refe
 	checkALError("Construct from file: Finished");
 }
 
-Sound::Sound(const char *data, int size, int channels, int freq, int bps) : buffer(AL_NONE), soundSource(AL_NONE), sampleLength(-1), volume(1),pitch(1),referenceDistance(1),maxDistance(MAX_FLOAT) {
+Sound::Sound(const char *data, int size, int channels, int freq, int bps) : referenceDistance(1), maxDistance(MAX_FLOAT), pitch(1), volume(1), buffer(AL_NONE), soundSource(AL_NONE), sampleLength(-1) {
 	checkALError("Construct: Loose error before construction");
 	buffer = loadBytes(data, size, freq, channels, bps);
 	

+ 1 - 1
Modules/Contents/3DPhysics/Source/PolyCollisionScene.cpp

@@ -26,7 +26,7 @@ THE SOFTWARE.
 
 using namespace Polycode;
 
-CollisionScene::CollisionScene(Vector3 size, bool virtualScene, bool deferInitCollision) : Scene(virtualScene), world(NULL), axisSweep(NULL), dispatcher(NULL), collisionConfiguration(NULL){ 
+CollisionScene::CollisionScene(Vector3 size, bool virtualScene, bool deferInitCollision) : Scene(virtualScene), world(NULL), collisionConfiguration(NULL), dispatcher(NULL), axisSweep(NULL) {
 	if(!deferInitCollision) {
 		initCollisionScene(size);
 	}