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:
parent
3ea4e8c249
commit
cf56f7ccce
@ -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;
|
||||
}
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user