瀏覽代碼

Remove duplicate semicolons

Alexander Wilms 1 年之前
父節點
當前提交
cca08e29da

+ 1 - 1
AI/Nullkiller/AIGateway.cpp

@@ -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));

+ 1 - 1
AI/VCAI/VCAI.cpp

@@ -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));

+ 1 - 1
client/adventureMap/AdventureMapInterface.cpp

@@ -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);

+ 1 - 1
client/gui/InterfaceObjectConfigurable.cpp

@@ -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

+ 1 - 1
client/widgets/TextControls.cpp

@@ -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) :

+ 2 - 2
lib/CHeroHandler.cpp

@@ -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

+ 1 - 1
lib/CSkillHandler.cpp

@@ -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

+ 2 - 2
lib/CTownHandler.cpp

@@ -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

+ 1 - 1
lib/gameState/CGameStateCampaign.cpp

@@ -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();
 }

+ 1 - 1
lib/mapObjectConstructors/CObjectClassesHandler.cpp

@@ -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;

+ 1 - 1
lib/mapping/MapFormatJson.cpp

@@ -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");

+ 4 - 4
lib/mapping/MapReaderH3M.cpp

@@ -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()

+ 1 - 1
lib/rmg/CZonePlacer.cpp

@@ -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)

+ 1 - 1
lib/rmg/modificators/RoadPlacer.cpp

@@ -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();
 		});
 

+ 1 - 1
mapeditor/maphandler.cpp

@@ -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);

+ 1 - 1
scripting/erm/ERMInterpreter.cpp

@@ -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;
 		}
 

+ 1 - 1
server/CVCMIServer.cpp

@@ -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)

+ 2 - 2
server/processors/PlayerMessageProcessor.cpp

@@ -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&)
 	{

+ 1 - 1
test/rmg/CRmgTemplateTest.cpp

@@ -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()));
 			}
 		}
 

+ 1 - 1
test/vcai/ResurceManagerTest.cpp

@@ -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));