Quellcode durchsuchen

Fixed clang warnings.

Frank Zago vor 13 Jahren
Ursprung
Commit
9fc459b5c8
2 geänderte Dateien mit 3 neuen und 4 gelöschten Zeilen
  1. 1 2
      lib/CGameState.cpp
  2. 2 2
      lib/map.cpp

+ 1 - 2
lib/CGameState.cpp

@@ -2812,7 +2812,6 @@ void CPathfinder::calculatePaths(int3 src /*= int3(-1,-1,-1)*/, int movement /*=
 
 			useEmbarkCost = 0; //0 - usual movement; 1 - embark; 2 - disembark
 
-			int moveAtNextTile = movement;
 			int turnAtNextTile = turn;
 
 
@@ -2846,7 +2845,7 @@ void CPathfinder::calculatePaths(int3 src /*= int3(-1,-1,-1)*/, int movement /*=
 			{
 				//occurs rarely, when hero with low movepoints tries to leave the road
 				turnAtNextTile++;
-				moveAtNextTile = hero->maxMovePoints(cp->land);
+				int moveAtNextTile = hero->maxMovePoints(cp->land);
 				cost = gs->getMovementCost(hero, cp->coord, dp->coord, moveAtNextTile); //cost must be updated, movement points changed :(
 				remains = moveAtNextTile - cost;
 			}

+ 2 - 2
lib/map.cpp

@@ -958,7 +958,7 @@ void Mapa::readRumors( const ui8 * bufor, int &i)
 void Mapa::readHeader( const ui8 * bufor, int &i)
 {
 	//reading allowed heroes (20 bytes)
-	int ist = i;				//starting i for loop
+	int ist;
 	ui8 disp = 0;
 
 	if(version>=SoD)
@@ -2209,4 +2209,4 @@ bool TerrainTile::hasFavourableWinds() const
 bool TerrainTile::isWater() const
 {
 	return tertype == water;
-}
+}