1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

vcmi: remove unused-but-set-variables

This commit is contained in:
Konstantin 2023-01-23 02:58:41 +03:00
parent 3ea4e8c249
commit cf56f7ccce
4 changed files with 1 additions and 13 deletions

View File

@ -207,11 +207,8 @@ void BattleInterface::stacksAreAttacked(std::vector<StackAttackedInfo> attackedI
std::array<int, 2> killedBySide = {0, 0};
int targets = 0;
for(const StackAttackedInfo & attackedInfo : attackedInfos)
{
++targets;
ui8 side = attackedInfo.defender->side;
killedBySide.at(side) += attackedInfo.amountKilled;
}

View File

@ -119,7 +119,6 @@ CBonusSelection::CBonusSelection()
void CBonusSelection::loadPositionsOfGraphics()
{
const JsonNode config(ResourceID("config/campaign_regions.json"));
int idx = 0;
for(const JsonNode & campaign : config["campaign_regions"].Vector())
{
@ -140,7 +139,6 @@ void CBonusSelection::loadPositionsOfGraphics()
campDescriptions.push_back(sc);
idx++;
}
}

View File

@ -439,11 +439,6 @@ CMultiPlayers::CMultiPlayers(const std::string & firstPlayer, ESelectionScreen S
void CMultiPlayers::onChange(std::string newText)
{
size_t namesCount = 0;
for(auto & elem : inputNames)
if(!elem->getText().empty())
namesCount++;
}
void CMultiPlayers::enterSelectionScreen()

View File

@ -322,7 +322,7 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
//setWidth(50);
logGlobal->trace("Player config:");
int humanPlayers = 0, cpuOnlyPlayers = 0, AIplayers = 0;
int cpuOnlyPlayers = 0;
for (auto player : players)
{
std::string playerType;
@ -330,7 +330,6 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
{
case EPlayerType::AI:
playerType = "AI";
AIplayers++;
break;
case EPlayerType::COMP_ONLY:
playerType = "computer only";
@ -338,7 +337,6 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
break;
case EPlayerType::HUMAN:
playerType = "human only";
humanPlayers++;
break;
default:
assert(false);