mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
vcmi: remove unused-but-set-variables
This commit is contained in:
@@ -207,11 +207,8 @@ void BattleInterface::stacksAreAttacked(std::vector<StackAttackedInfo> attackedI
|
|||||||
|
|
||||||
std::array<int, 2> killedBySide = {0, 0};
|
std::array<int, 2> killedBySide = {0, 0};
|
||||||
|
|
||||||
int targets = 0;
|
|
||||||
for(const StackAttackedInfo & attackedInfo : attackedInfos)
|
for(const StackAttackedInfo & attackedInfo : attackedInfos)
|
||||||
{
|
{
|
||||||
++targets;
|
|
||||||
|
|
||||||
ui8 side = attackedInfo.defender->side;
|
ui8 side = attackedInfo.defender->side;
|
||||||
killedBySide.at(side) += attackedInfo.amountKilled;
|
killedBySide.at(side) += attackedInfo.amountKilled;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,6 @@ CBonusSelection::CBonusSelection()
|
|||||||
void CBonusSelection::loadPositionsOfGraphics()
|
void CBonusSelection::loadPositionsOfGraphics()
|
||||||
{
|
{
|
||||||
const JsonNode config(ResourceID("config/campaign_regions.json"));
|
const JsonNode config(ResourceID("config/campaign_regions.json"));
|
||||||
int idx = 0;
|
|
||||||
|
|
||||||
for(const JsonNode & campaign : config["campaign_regions"].Vector())
|
for(const JsonNode & campaign : config["campaign_regions"].Vector())
|
||||||
{
|
{
|
||||||
@@ -140,7 +139,6 @@ void CBonusSelection::loadPositionsOfGraphics()
|
|||||||
|
|
||||||
campDescriptions.push_back(sc);
|
campDescriptions.push_back(sc);
|
||||||
|
|
||||||
idx++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -439,11 +439,6 @@ CMultiPlayers::CMultiPlayers(const std::string & firstPlayer, ESelectionScreen S
|
|||||||
|
|
||||||
void CMultiPlayers::onChange(std::string newText)
|
void CMultiPlayers::onChange(std::string newText)
|
||||||
{
|
{
|
||||||
size_t namesCount = 0;
|
|
||||||
|
|
||||||
for(auto & elem : inputNames)
|
|
||||||
if(!elem->getText().empty())
|
|
||||||
namesCount++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMultiPlayers::enterSelectionScreen()
|
void CMultiPlayers::enterSelectionScreen()
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
|
|||||||
//setWidth(50);
|
//setWidth(50);
|
||||||
|
|
||||||
logGlobal->trace("Player config:");
|
logGlobal->trace("Player config:");
|
||||||
int humanPlayers = 0, cpuOnlyPlayers = 0, AIplayers = 0;
|
int cpuOnlyPlayers = 0;
|
||||||
for (auto player : players)
|
for (auto player : players)
|
||||||
{
|
{
|
||||||
std::string playerType;
|
std::string playerType;
|
||||||
@@ -330,7 +330,6 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
|
|||||||
{
|
{
|
||||||
case EPlayerType::AI:
|
case EPlayerType::AI:
|
||||||
playerType = "AI";
|
playerType = "AI";
|
||||||
AIplayers++;
|
|
||||||
break;
|
break;
|
||||||
case EPlayerType::COMP_ONLY:
|
case EPlayerType::COMP_ONLY:
|
||||||
playerType = "computer only";
|
playerType = "computer only";
|
||||||
@@ -338,7 +337,6 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
|
|||||||
break;
|
break;
|
||||||
case EPlayerType::HUMAN:
|
case EPlayerType::HUMAN:
|
||||||
playerType = "human only";
|
playerType = "human only";
|
||||||
humanPlayers++;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user