Permalink
Browse files

Undefined variables fix

  • Loading branch information...
1 parent 226a97d commit a16c7d10939a5f0ce6a63a9518b4c197e8d0f4d6 @is06 committed Feb 21, 2012
Showing with 17 additions and 17 deletions.
  1. +5 −5 src/3d/AnimatedModel.cpp
  2. +1 −1 src/Save.cpp
  3. +4 −4 src/SaveFile.cpp
  4. +7 −7 src/sound/MusicReference.cpp
View
@@ -274,12 +274,12 @@ void AnimatedModel::loadAnimation(const string& fileName)
bool inAnimEndDeclaration = false;
bool inAnimLoopedDeclaration = false;
- c8 current;
+ char current = 0;
s32 nr = 0;
- string animNumber;
- string startFrame;
- string endFrame;
- bool looped;
+ string animNumber("");
+ string startFrame("");
+ string endFrame("");
+ bool looped = true;
while (fileStream.get(current)) {
if (current == '=') {
View
@@ -140,7 +140,7 @@ void Save::setGeneralDefaultValues()
// Time info
integerList[11] = 0; // Total game time, in seconds
- integerList[12] = 1400; // World time, from 0 to 1439, 720 = 12pm
+ integerList[12] = 1337; // World time, from 0 to 1439, 720 = 12pm
}
/**
View
@@ -80,13 +80,13 @@ void SaveFile::addVariable(u32 index, const wstring& value)
*/
SaveFileElement SaveFile::getNextElement()
{
- wchar_t currentChar;
+ wchar_t currentChar = 0;
bool inIndexDeclaration = true;
bool inTypeDeclaration = false;
bool inValueDeclaration = false;
- string index = "";
- char type;
- wstring value = L"";
+ string index("");
+ char type = 0;
+ wstring value(L"");
SaveFileElement result;
@@ -25,13 +25,13 @@ MusicReference::MusicReference()
bool inSeqEndDeclaration = false;
bool inSeqFileDeclaration = false;
- char current;
- string musicName;
- string sequenceNumber;
- bool sequenceLooped;
- string sequenceLoopStart;
- string sequenceLoopEnd;
- string sequenceFileName;
+ char current = 0;
+ string musicName("");
+ string sequenceNumber("");
+ bool sequenceLooped = true;
+ string sequenceLoopStart("");
+ string sequenceLoopEnd("");
+ string sequenceFileName("");
while (fileStream.get(current)) {
if (current == '=') {

0 comments on commit a16c7d1

Please sign in to comment.