From fc15047d568edaead1a6c537f94c9fb63bf3731a Mon Sep 17 00:00:00 2001 From: Faerbit Date: Tue, 24 Feb 2015 10:50:11 +0100 Subject: [PATCH] Removing maybe unitiliazed errors. --- loader.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loader.cc b/loader.cc index 642d5e1..cbe3bc8 100644 --- a/loader.cc +++ b/loader.cc @@ -178,7 +178,7 @@ void Loader::load(std::string filePath, Level* level, std::string compositionsPa float mass = queryFloat(xmlObject, "mass"); XMLElement* constraint = thisComposition->FirstChildElement("positionConstraint"); bool rotate = (constraint == NULL); - float dampningL, dampningA; + float dampningL = 0.0f, dampningA = 0.0f; if (physicType.compare("None") != 0){ dampningL = queryFloat(objectData, "dampningL"); dampningA = queryFloat(objectData, "dampningA"); @@ -376,7 +376,7 @@ void Loader::load(std::string filePath, Level* level, std::string compositionsPa int objectNum = queryInt(positionConstraint, "objectNum"); int idGreen = queryInt(composition, "idGreen"); int idBlue = queryInt(composition, "idBlue"); - int objectIndex; + int objectIndex = 0; bool ok = false; for (unsigned int i = 0; i