1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Merge pull request #3509 from Alexander-Wilms/remove-duplicate-semicolons

Remove duplicate semicolons
This commit is contained in:
Ivan Savenko 2024-01-16 22:16:46 +02:00 committed by GitHub
commit 93b0838e45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 26 additions and 26 deletions

View File

@ -101,7 +101,7 @@ void AIGateway::heroMoved(const TryMoveHero & details, bool verbose)
if(!hero)
validateObject(details.id); //enemy hero may have left visible area
const int3 from = hero ? hero->convertToVisitablePos(details.start) : (details.start - int3(0,1,0));;
const int3 from = hero ? hero->convertToVisitablePos(details.start) : (details.start - int3(0,1,0));
const int3 to = hero ? hero->convertToVisitablePos(details.end) : (details.end - int3(0,1,0));
const CGObjectInstance * o1 = vstd::frontOrNull(cb->getVisitableObjs(from, verbose));

View File

@ -104,7 +104,7 @@ void VCAI::heroMoved(const TryMoveHero & details, bool verbose)
validateObject(details.id);
auto hero = cb->getHero(details.id);
const int3 from = hero ? hero->convertToVisitablePos(details.start) : (details.start - int3(0,1,0));;
const int3 from = hero ? hero->convertToVisitablePos(details.start) : (details.start - int3(0,1,0));
const int3 to = hero ? hero->convertToVisitablePos(details.end) : (details.end - int3(0,1,0));
const CGObjectInstance * o1 = vstd::frontOrNull(cb->getVisitableObjs(from, verbose));

View File

@ -304,7 +304,7 @@ void AdventureMapInterface::onSelectionChanged(const CArmedInstance *sel)
auto town = dynamic_cast<const CGTownInstance*>(sel);
widget->getInfoBar()->showTownSelection(town);
widget->getTownList()->updateWidget();;
widget->getTownList()->updateWidget();
widget->getTownList()->select(town);
widget->getHeroList()->select(nullptr);
onHeroChanged(nullptr);

View File

@ -301,7 +301,7 @@ EShortcut InterfaceObjectConfigurable::readHotkey(const JsonNode & config) const
EShortcut result = GH.shortcuts().findShortcut(config.String());
if (result == EShortcut::NONE)
logGlobal->error("Invalid hotkey '%s' in interface configuration!", config.String());
return result;;
return result;
}
std::shared_ptr<CPicture> InterfaceObjectConfigurable::buildPicture(const JsonNode & config) const

View File

@ -104,7 +104,7 @@ void CLabel::setColor(const ColorRGBA & Color)
size_t CLabel::getWidth()
{
return graphics->fonts[font]->getStringWidth(visibleText());;
return graphics->fonts[font]->getStringWidth(visibleText());
}
CMultiLineLabel::CMultiLineLabel(Rect position, EFonts Font, ETextAlignment Align, const ColorRGBA & Color, const std::string & Text) :

View File

@ -44,7 +44,7 @@ int32_t CHero::getIconIndex() const
std::string CHero::getJsonKey() const
{
return modScope + ':' + identifier;;
return modScope + ':' + identifier;
}
HeroTypeID CHero::getId() const
@ -172,7 +172,7 @@ int32_t CHeroClass::getIconIndex() const
std::string CHeroClass::getJsonKey() const
{
return modScope + ':' + identifier;;
return modScope + ':' + identifier;
}
HeroClassID CHeroClass::getId() const

View File

@ -59,7 +59,7 @@ std::string CSkill::getNameTranslated() const
std::string CSkill::getJsonKey() const
{
return modScope + ':' + identifier;;
return modScope + ':' + identifier;
}
std::string CSkill::getDescriptionTextID(int level) const

View File

@ -75,7 +75,7 @@ const BuildingTypeUniqueID CBuilding::getUniqueTypeID() const
std::string CBuilding::getJsonKey() const
{
return modScope + ':' + identifier;;
return modScope + ':' + identifier;
}
std::string CBuilding::getNameTranslated() const
@ -154,7 +154,7 @@ int32_t CFaction::getIconIndex() const
std::string CFaction::getJsonKey() const
{
return modScope + ':' + identifier;;
return modScope + ':' + identifier;
}
void CFaction::registerIcons(const IconRegistar & cb) const

View File

@ -54,7 +54,7 @@ std::optional<CampaignScenarioID> CGameStateCampaign::getHeroesSourceScenario()
auto bonus = currentBonus();
if(bonus && bonus->type == CampaignBonusType::HEROES_FROM_PREVIOUS_SCENARIO)
return static_cast<CampaignScenarioID>(bonus->info2);;
return static_cast<CampaignScenarioID>(bonus->info2);
return campaignState->lastScenario();
}

View File

@ -202,7 +202,7 @@ TObjectTypeHandler CObjectClassesHandler::loadSubObjectFromJson(const std::strin
auto createdObject = handlerConstructors.at(handler)();
createdObject->modScope = scope;
createdObject->typeName = obj->identifier;;
createdObject->typeName = obj->identifier;
createdObject->subTypeName = identifier;
createdObject->type = obj->id;

View File

@ -1360,7 +1360,7 @@ void CMapSaverJson::writeTranslations()
if(Languages::getLanguageOptions(language).identifier.empty())
{
logGlobal->error("Serializing of unsupported language %s is not permitted", language);
continue;;
continue;
}
logGlobal->trace("Saving translations, language: %s", language);
addToArchive(s.second, language + ".json");

View File

@ -149,7 +149,7 @@ CreatureID MapReaderH3M::readCreature()
return CreatureID::NONE;
if(result.getNum() < features.creaturesCount)
return remapIdentifier(result);;
return remapIdentifier(result);
// this may be random creature in army/town, to be randomized later
CreatureID randomIndex(result.getNum() - features.creatureIdentifierInvalid - 1);
@ -166,7 +166,7 @@ TerrainId MapReaderH3M::readTerrain()
{
TerrainId result(readUInt8());
assert(result.getNum() < features.terrainsCount);
return remapIdentifier(result);;
return remapIdentifier(result);
}
RoadId MapReaderH3M::readRoad()
@ -187,7 +187,7 @@ SecondarySkill MapReaderH3M::readSkill()
{
SecondarySkill result(readUInt8());
assert(result.getNum() < features.skillsCount);
return remapIdentifier(result);;
return remapIdentifier(result);
}
SpellID MapReaderH3M::readSpell()
@ -199,7 +199,7 @@ SpellID MapReaderH3M::readSpell()
return SpellID::PRESET;
assert(result.getNum() < features.spellsCount);
return remapIdentifier(result);;
return remapIdentifier(result);
}
SpellID MapReaderH3M::readSpell32()

View File

@ -402,7 +402,7 @@ void CZonePlacer::placeZones(CRandomGenerator * rand)
//TODO: Don't do this is fitness was improved
moveOneZone(zones, totalForces, distances, overlaps);
improved |= evaluateSolution();;
improved |= evaluateSolution();
}
if (!improved)

View File

@ -121,7 +121,7 @@ void RoadPlacer::drawRoads(bool secondary)
//Do not draw roads on underground rock or water
roads.erase_if([this](const int3& pos) -> bool
{
const auto* terrain = map.getTile(pos).terType;;
const auto* terrain = map.getTile(pos).terType;
return !terrain->isPassable() || !terrain->isLand();
});

View File

@ -125,7 +125,7 @@ void MapHandler::drawRoad(QPainter & painter, int x, int y, int z)
if(tinfo.roadType) //print road from this tile
{
auto roadName = tinfo.roadType->getJsonKey();;
auto roadName = tinfo.roadType->getJsonKey();
QRect source(0, 0, tileSize, tileSize / 2);
ui8 rotation = (tinfo.extTileFlags >> 4) % 4;
bool hflip = (rotation == 1 || rotation == 3);

View File

@ -321,7 +321,7 @@ namespace ERMConverter
{
ParamIO ret;
ret.isInput = true;
ret.name = (std::visit(LVL1IexpToVar(), cmp)).str();;
ret.name = (std::visit(LVL1IexpToVar(), cmp)).str();
return ret;
}

View File

@ -1051,7 +1051,7 @@ void CVCMIServer::optionSetBonus(PlayerColor player, PlayerStartingBonus id)
if(s.castle == FactionID::RANDOM && id == PlayerStartingBonus::RESOURCE) //random castle - can't be resource
return;
s.bonus = id;;
s.bonus = id;
}
bool CVCMIServer::canUseThisHero(PlayerColor player, HeroTypeID ID)

View File

@ -293,7 +293,7 @@ void PlayerMessageProcessor::cheatMovement(PlayerColor player, const CGHeroInsta
bool unlimited = false;
try
{
smp.val = std::stol(words.at(0));;
smp.val = std::stol(words.at(0));
}
catch(std::logic_error&)
{
@ -326,7 +326,7 @@ void PlayerMessageProcessor::cheatResources(PlayerColor player, std::vector<std:
int baseResourceAmount;
try
{
baseResourceAmount = std::stol(words.at(0));;
baseResourceAmount = std::stol(words.at(0));
}
catch(std::logic_error&)
{

View File

@ -71,7 +71,7 @@ protected:
const auto otherZone = subject->getZones().at(otherZoneId);
GTEST_ASSERT_NE(otherZone, nullptr);
EXPECT_THAT(thisZone->getTreasureInfo(), ContainerEq(otherZone->getTreasureInfo()));;
EXPECT_THAT(thisZone->getTreasureInfo(), ContainerEq(otherZone->getTreasureInfo()));
}
}

View File

@ -87,7 +87,7 @@ TEST_F(ResourceManagerTest, notifyGoalImplemented)
EXPECT_FALSE(rm->notifyGoalCompleted(invalidGoal));
EXPECT_FALSE(rm->hasTasksLeft());
TResources res(0,0,0,0,0,0,12345);;
TResources res(0,0,0,0,0,0,12345);
rm->reserveResoures(res, invalidGoal);
ASSERT_FALSE(rm->hasTasksLeft()) << "Can't push Invalid goal";
EXPECT_FALSE(rm->notifyGoalCompleted(invalidGoal));