1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Merge pull request #451 from josch/develop

Remove compilation warnings
This commit is contained in:
ArseniyShestakov 2018-04-27 17:29:15 +07:00 committed by GitHub
commit 6f6f399911
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 10 deletions

View File

@ -1369,7 +1369,6 @@ void VCAI::buildStructure(const CGTownInstance * t)
//below algorithm focuses on economy growth at start of the game.
TResources currentRes = cb->getResourceAmount();
TResources currentIncome = t->dailyIncome();
int townIncome = currentIncome[Res::GOLD];
if(tryBuildAnyStructure(t, std::vector<BuildingID>(essential, essential + ARRAY_COUNT(essential))))
return;

View File

@ -1042,7 +1042,6 @@ void CPlayerInterface::battleAttack(const BattleAttack * ba)
}
else
{
auto attackFrom = actionTarget.at(0).hexValue;
auto attackTarget = actionTarget.at(1).hexValue;
//TODO: use information from BattleAttack but not curAction
@ -1336,7 +1335,7 @@ template <typename Handler> void CPlayerInterface::serializeTempl( Handler &h, c
{
if(version < 774 && !h.saving)
{
bool observerInDuelMode;
bool observerInDuelMode = false;
h & observerInDuelMode;
}

View File

@ -2747,7 +2747,7 @@ void CBattleInterface::obstaclePlaced(const CObstacleInstance & oi)
//so when multiple obstacles are added, they show up one after another
waitForAnims();
soundBase::soundID sound; // FIXME(v.markovtsev): soundh->playSound() is commented in the end => warning
//soundBase::soundID sound; // FIXME(v.markovtsev): soundh->playSound() is commented in the end => warning
std::string defname;

View File

@ -597,10 +597,9 @@ bool CRmgTemplateZone::createRoad(const int3& src, const int3& dst)
if (distance < bestDistanceSoFar)
{
auto tile = &gen->map->getTile(pos);
auto obj = tile->topVisitableObj();
bool canMoveBetween = gen->map->canMoveBetween(currentNode, pos);
if (gen->isFree(pos) && gen->isFree(currentNode) //empty path
if ((gen->isFree(pos) && gen->isFree(currentNode)) //empty path
|| ((tile->visitable || currentTile->visitable) && canMoveBetween) //moving from or to visitable object
|| pos == dst) //we already compledted the path
{

View File

@ -580,7 +580,6 @@ void CVCMIServer::setPlayer(PlayerColor clickedColor)
PlayerSettings & clicked = si->playerInfos[clickedColor];
PlayerSettings * old = nullptr;
//identify clicked player
int clickedNameID = 0; //number of player - zero means AI, assume it initially
@ -628,7 +627,6 @@ void CVCMIServer::setPlayer(PlayerColor clickedColor)
playerToRestore.color = i->first;
playerToRestore.id = newPlayer;
setPlayerConnectedId(i->second, PlayerSettings::PLAYER_AI); //set computer
old = &i->second;
break;
}
}