Explorar o código

Silence some uninitialized variable warnings

These are false positives but the compiler isn't smart enough to see that.
Also it might make more sense to use switch here.
Turo Lamminen %!s(int64=10) %!d(string=hai) anos
pai
achega
f708d0b122
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      code/TextureTransform.cpp

+ 2 - 2
code/TextureTransform.cpp

@@ -120,7 +120,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
 	 * offset 2 and 3)
 	 * offset 2 and 3)
 	 */
 	 */
 	if ((rounded  = (int)info.mTranslation.x))	{
 	if ((rounded  = (int)info.mTranslation.x))	{
-		float out;
+		float out = 0.0f;
 		szTemp[0] = 0;
 		szTemp[0] = 0;
 		if (aiTextureMapMode_Wrap == info.mapU)	{
 		if (aiTextureMapMode_Wrap == info.mapU)	{
 			// Wrap - simple take the fraction of the field
 			// Wrap - simple take the fraction of the field
@@ -153,7 +153,7 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
 	 * offset 2 and 3)
 	 * offset 2 and 3)
 	 */
 	 */
 	if ((rounded  = (int)info.mTranslation.y))	{
 	if ((rounded  = (int)info.mTranslation.y))	{
-		float out;
+		float out = 0.0f;
 		szTemp[0] = 0;
 		szTemp[0] = 0;
 		if (aiTextureMapMode_Wrap == info.mapV)	{
 		if (aiTextureMapMode_Wrap == info.mapV)	{
 			// Wrap - simple take the fraction of the field
 			// Wrap - simple take the fraction of the field