1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

Code cleanup: remove double and unneded semicolons

This commit is contained in:
Arseniy Shestakov
2017-07-12 22:01:10 +03:00
parent 09df2dcfbb
commit dbcd79c48a
25 changed files with 29 additions and 29 deletions

View File

@ -35,7 +35,7 @@ void CBattleAI::init(std::shared_ptr<CBattleCallback> CB)
{ {
setCbc(CB); setCbc(CB);
cb = CB; cb = CB;
playerID = *CB->getPlayerID();; //TODO should be sth in callback playerID = *CB->getPlayerID(); //TODO should be sth in callback
wasWaitingForRealize = cb->waitTillRealize; wasWaitingForRealize = cb->waitTillRealize;
wasUnlockingGs = CB->unlockGsWhenWaiting; wasUnlockingGs = CB->unlockGsWhenWaiting;
CB->waitTillRealize = true; CB->waitTillRealize = true;

View File

@ -215,7 +215,7 @@ void CStupidAI::battleNewRound(int round)
void CStupidAI::battleStackMoved(const CStack * stack, std::vector<BattleHex> dest, int distance) void CStupidAI::battleStackMoved(const CStack * stack, std::vector<BattleHex> dest, int distance)
{ {
print("battleStackMoved called");; print("battleStackMoved called");
} }
void CStupidAI::battleSpellCast(const BattleSpellCast *sc) void CStupidAI::battleSpellCast(const BattleSpellCast *sc)

View File

@ -611,7 +611,7 @@ void removeGUI()
logGlobal->infoStream() << "Removed GUI."; logGlobal->infoStream() << "Removed GUI.";
LOCPLINT = nullptr; LOCPLINT = nullptr;
}; }
void processCommand(const std::string &message) void processCommand(const std::string &message)
{ {

View File

@ -781,7 +781,7 @@ void CSelectionScreen::toggleTab(CIntObject *tab)
else else
{ {
curTab = nullptr; curTab = nullptr;
}; }
GH.totalRedraw(); GH.totalRedraw();
} }

View File

@ -897,7 +897,7 @@ void CBattleInterface::bSpellf()
//Handle Orb of Inhibition-like effects -> we want to display dialog with info, why casting is impossible //Handle Orb of Inhibition-like effects -> we want to display dialog with info, why casting is impossible
auto blockingBonus = currentHero()->getBonusLocalFirst(Selector::type(Bonus::BLOCK_ALL_MAGIC)); auto blockingBonus = currentHero()->getBonusLocalFirst(Selector::type(Bonus::BLOCK_ALL_MAGIC));
if (!blockingBonus) if (!blockingBonus)
return;; return;
if (blockingBonus->source == Bonus::ARTIFACT) if (blockingBonus->source == Bonus::ARTIFACT)
{ {

View File

@ -449,7 +449,7 @@ void CDefFile::loadFrame(size_t frame, size_t group, ImageLoader &loader) const
logGlobal->errorStream()<<"Error: unsupported format of def file: "<<sprite.format; logGlobal->errorStream()<<"Error: unsupported format of def file: "<<sprite.format;
break; break;
} }
}; }
CDefFile::~CDefFile() = default; CDefFile::~CDefFile() = default;

View File

@ -607,7 +607,7 @@ void CFramerateManager::framerateDelay()
fps = ceil(1000.0 / (accumulatedTime/accumulatedFrames)); fps = ceil(1000.0 / (accumulatedTime/accumulatedFrames));
accumulatedTime = 0; accumulatedTime = 0;
accumulatedFrames = 0; accumulatedFrames = 0;
}; }
currentTicks = SDL_GetTicks(); currentTicks = SDL_GetTicks();
// recalculate timeElapsed for external calls via getElapsed() // recalculate timeElapsed for external calls via getElapsed()

View File

@ -139,7 +139,7 @@ SDL_Surface * CSDL_Ext::horizontalFlip(SDL_Surface * toRot)
SDL_UnlockSurface(ret); SDL_UnlockSurface(ret);
SDL_UnlockSurface(toRot); SDL_UnlockSurface(toRot);
return ret; return ret;
}; }
Uint32 CSDL_Ext::SDL_GetPixel(SDL_Surface *surface, const int & x, const int & y, bool colorByte) Uint32 CSDL_Ext::SDL_GetPixel(SDL_Surface *surface, const int & x, const int & y, bool colorByte)
{ {

View File

@ -997,7 +997,7 @@ void CCommanderArtPlace::createImage()
void CCommanderArtPlace::returnArtToHeroCallback() void CCommanderArtPlace::returnArtToHeroCallback()
{ {
ArtifactPosition artifactPos = commanderSlotID;; ArtifactPosition artifactPos = commanderSlotID;
ArtifactPosition freeSlot = ourArt->firstBackpackSlot(commanderOwner); ArtifactPosition freeSlot = ourArt->firstBackpackSlot(commanderOwner);
ArtifactLocation src(commanderOwner->commander.get(), artifactPos); ArtifactLocation src(commanderOwner->commander.get(), artifactPos);

View File

@ -84,7 +84,7 @@ void CGarrisonSlot::hover (bool on)
temp = CGI->generaltexth->allTexts[481]; //Select %s temp = CGI->generaltexth->allTexts[481]; //Select %s
} }
boost::algorithm::replace_first(temp,"%s",creature->nameSing); boost::algorithm::replace_first(temp,"%s",creature->nameSing);
}; }
} }
else else
{ {

View File

@ -50,7 +50,7 @@ CPicture::CPicture( const std::string &bmpname, int x, int y )
{ {
init(); init();
bg = BitmapHandler::loadBitmap(bmpname); bg = BitmapHandler::loadBitmap(bmpname);
freeSurf = true;; freeSurf = true;
pos.x += x; pos.x += x;
pos.y += y; pos.y += y;
if(bg) if(bg)
@ -445,7 +445,7 @@ CCreatureAnim::CCreatureAnim(int x, int y, std::string name, Rect picPos, ui8 fl
pos.w = picPos.w; pos.w = picPos.w;
if (picPos.h) if (picPos.h)
pos.h = picPos.h; pos.h = picPos.h;
}; }
void CCreatureAnim::loopPreview(bool warMachine) void CCreatureAnim::loopPreview(bool warMachine)
{ {

View File

@ -618,7 +618,7 @@ void CFocusable::moveFocus()
if((*i)->active) if((*i)->active)
{ {
(*i)->giveFocus(); (*i)->giveFocus();
break;; break;
} }
} }
} }

View File

@ -61,7 +61,7 @@ jclass CAndroidVMHelper::findClassloadedClass(const std::string & name)
{ {
auto env = get(); auto env = get();
return static_cast<jclass>(env->CallObjectMethod(vcmiClassLoader, vcmiFindClassMethod, return static_cast<jclass>(env->CallObjectMethod(vcmiClassLoader, vcmiFindClassMethod,
env->NewStringUTF(name.c_str())));; env->NewStringUTF(name.c_str())));
} }
void CAndroidVMHelper::callStaticVoidMethod(const std::string & cls, const std::string & method, void CAndroidVMHelper::callStaticVoidMethod(const std::string & cls, const std::string & method,

View File

@ -1050,7 +1050,7 @@ std::string Bonus::Description() const
{ {
case ARTIFACT: case ARTIFACT:
str << VLC->arth->artifacts[sid]->Name(); str << VLC->arth->artifacts[sid]->Name();
break;; break;
case SPELL_EFFECT: case SPELL_EFFECT:
str << SpellID(sid).toSpell()->name; str << SpellID(sid).toSpell()->name;
break; break;

View File

@ -256,7 +256,7 @@ bool JsonParser::extractEscaping(std::string &str)
break; case 't': str += '\t'; break; case 't': str += '\t';
break; case '/': str += '/'; break; case '/': str += '/';
break; default: return error("Unknown escape sequence!", true); break; default: return error("Unknown escape sequence!", true);
}; }
return true; return true;
} }

View File

@ -81,7 +81,7 @@ void LibClasses::loadFilesystem()
static void logHandlerLoaded(const std::string& name, CStopWatch &timer) static void logHandlerLoaded(const std::string& name, CStopWatch &timer)
{ {
logGlobal->infoStream()<<"\t\t" << name << " handler: "<<timer.getDiff(); logGlobal->infoStream()<<"\t\t" << name << " handler: "<<timer.getDiff();
}; }
template <class Handler> void createHandler(Handler *&handler, const std::string &name, CStopWatch &timer) template <class Handler> void createHandler(Handler *&handler, const std::string &name, CStopWatch &timer)
{ {

View File

@ -297,7 +297,7 @@ void CGDwelling::updateGuards() const
const CCreature * crea = VLC->creh->creatures[creatureEntry.second.at(0)]; const CCreature * crea = VLC->creh->creatures[creatureEntry.second.at(0)];
SlotID slot = getSlotFor(crea->idNumber); SlotID slot = getSlotFor(crea->idNumber);
StackLocation stackLocation = StackLocation(this, slot);; StackLocation stackLocation = StackLocation(this, slot);
if (hasStackAtSlot(slot)) //stack already exists, overwrite it if (hasStackAtSlot(slot)) //stack already exists, overwrite it
{ {
ChangeStackCount csc; ChangeStackCount csc;

View File

@ -257,7 +257,7 @@ void CDrawRoadsOperation::updateTiles(std::set<int3> & invalidated)
} }
} }
}; }
bool CDrawRoadsOperation::tileHasSomething(const int3& pos) const bool CDrawRoadsOperation::tileHasSomething(const int3& pos) const
{ {

View File

@ -43,7 +43,7 @@ std::unique_ptr<CMap> CMapLoaderH3M::loadMap()
mapHeader = std::unique_ptr<CMapHeader>(dynamic_cast<CMapHeader *>(map)); mapHeader = std::unique_ptr<CMapHeader>(dynamic_cast<CMapHeader *>(map));
init(); init();
return std::unique_ptr<CMap>(dynamic_cast<CMap *>(mapHeader.release()));; return std::unique_ptr<CMap>(dynamic_cast<CMap *>(mapHeader.release()));
} }
std::unique_ptr<CMapHeader> CMapLoaderH3M::loadMapHeader() std::unique_ptr<CMapHeader> CMapLoaderH3M::loadMapHeader()
@ -1409,7 +1409,7 @@ void CMapLoaderH3M::readObjects()
hp->setOwner(PlayerColor(reader.readUInt8())); hp->setOwner(PlayerColor(reader.readUInt8()));
int htid = reader.readUInt8();; //hero type id int htid = reader.readUInt8(); //hero type id
nobj->subID = htid; nobj->subID = htid;
if(htid == 0xff) if(htid == 0xff)

View File

@ -386,4 +386,4 @@ std::vector<JsonNode> CRmgTemplateStorage::loadLegacyData(size_t dataSize)
{ {
return std::vector<JsonNode>(); return std::vector<JsonNode>();
//it would be cool to load old rmg.txt files //it would be cool to load old rmg.txt files
}; }

View File

@ -2003,7 +2003,7 @@ int3 CRmgTemplateZone::getAccessibleOffset(CMapGenerator* gen, ObjectTemplate &a
} }
} }
} }
}; }
} }
return ret; return ret;
} }
@ -2545,7 +2545,7 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
return obj; return obj;
}; };
oi.setTemplate(Obj::PANDORAS_BOX, 0, terrainType); oi.setTemplate(Obj::PANDORAS_BOX, 0, terrainType);
oi.value = i * 5000;; oi.value = i * 5000;
oi.probability = 5; oi.probability = 5;
possibleObjects.push_back(oi); possibleObjects.push_back(oi);
} }
@ -2561,7 +2561,7 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
return obj; return obj;
}; };
oi.setTemplate(Obj::PANDORAS_BOX, 0, terrainType); oi.setTemplate(Obj::PANDORAS_BOX, 0, terrainType);
oi.value = i * 6000;; oi.value = i * 6000;
oi.probability = 20; oi.probability = 20;
possibleObjects.push_back(oi); possibleObjects.push_back(oi);
} }

View File

@ -377,7 +377,7 @@ void EarthquakeMechanics::applyBattleEffects(const SpellCastEnvironment * env, c
if(bsr.stackIDs.size() > 0) if(bsr.stackIDs.size() > 0)
env->sendAndApply(&bsr); env->sendAndApply(&bsr);
} }
}; }
env->sendAndApply(&ca); env->sendAndApply(&ca);
} }

View File

@ -710,7 +710,7 @@ std::vector<const CStack *> DefaultSpellMechanics::calculateAffectedStacks(const
{ {
if(const CStack * st = cb->battleGetStackByPos(hex, ctx.ti.onlyAlive)) if(const CStack * st = cb->battleGetStackByPos(hex, ctx.ti.onlyAlive))
if(mainFilter(st)) if(mainFilter(st))
attackedCres.insert(st);; attackedCres.insert(st);
} }
} }

View File

@ -471,7 +471,7 @@ namespace ERM
qi::rule<Iterator, TVExp(), ascii::space_type> vexp; qi::rule<Iterator, TVExp(), ascii::space_type> vexp;
qi::rule<Iterator, TLine(), ascii::space_type> vline; qi::rule<Iterator, TLine(), ascii::space_type> vline;
}; };
}; }
ERM::TLine ERMParser::parseLine( const std::string & line, int realLineNo ) ERM::TLine ERMParser::parseLine( const std::string & line, int realLineNo )
{ {

View File

@ -6282,7 +6282,7 @@ void CGameHandler::removeAfterVisit(const CGObjectInstance *object)
return; return;
} }
} }
}; }
//If we haven't returned so far, there is no query and no visit, call was wrong //If we haven't returned so far, there is no query and no visit, call was wrong
assert("This function needs to be called during the object visit!"); assert("This function needs to be called during the object visit!");