From 8152f99ec4a4febd1cbeeee97346774f8f2bdf97 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Thu, 1 Dec 2016 23:09:14 -0800 Subject: [PATCH] Fixed compiler warnings. --- common/lc_library.cpp | 6 ++---- common/lc_synth.cpp | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/common/lc_library.cpp b/common/lc_library.cpp index 5c30712a..70a2e8de 100644 --- a/common/lc_library.cpp +++ b/common/lc_library.cpp @@ -1678,8 +1678,6 @@ bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransf } else { - bool Loaded = false; - for (int PieceInfoIndex = 0; PieceInfoIndex < mPieces.GetSize(); PieceInfoIndex++) { PieceInfo* Info = mPieces[PieceInfoIndex]; @@ -1692,7 +1690,7 @@ bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransf lcMemFile IncludeFile; if (mZipFiles[Info->mZipFileType]->ExtractFile(Info->mZipFileIndex, IncludeFile)) - Loaded = ReadMeshData(IncludeFile, IncludeTransform, ColorCode, TextureStack, MeshData, MeshDataType, Optimize); + ReadMeshData(IncludeFile, IncludeTransform, ColorCode, TextureStack, MeshData, MeshDataType, Optimize); } else { @@ -1705,7 +1703,7 @@ bool lcPiecesLibrary::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransf sprintf(FileName, "%sparts/%s.dat", mLibraryPath, Name); if (IncludeFile.Open(FileName, "rt")) - Loaded = ReadMeshData(IncludeFile, IncludeTransform, ColorCode, TextureStack, MeshData, MeshDataType, Optimize); + ReadMeshData(IncludeFile, IncludeTransform, ColorCode, TextureStack, MeshData, MeshDataType, Optimize); } break; diff --git a/common/lc_synth.cpp b/common/lc_synth.cpp index db295b78..ee59dce3 100644 --- a/common/lc_synth.cpp +++ b/common/lc_synth.cpp @@ -59,8 +59,8 @@ void lcSynthInit() lcSynthInfo::lcSynthInfo(lcSynthType Type, float Length, int NumSections, PieceInfo* Info) : mPieceInfo(Info), mType(Type), mLength(Length), mNumSections(NumSections) { - float EdgeSectionLength; - float MidSectionLength; + float EdgeSectionLength = 0.0f; + float MidSectionLength = 0.0f; switch (mType) { @@ -115,7 +115,7 @@ void lcSynthInfo::GetDefaultControlPoints(lcArray& ControlP { ControlPoints.SetSize(2); - float Scale; + float Scale = 1.0f; switch (mType) {