mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Code cleanup: remove double and unneded semicolons
This commit is contained in:
parent
09df2dcfbb
commit
dbcd79c48a
@ -35,7 +35,7 @@ void CBattleAI::init(std::shared_ptr<CBattleCallback> CB)
|
||||
{
|
||||
setCbc(CB);
|
||||
cb = CB;
|
||||
playerID = *CB->getPlayerID();; //TODO should be sth in callback
|
||||
playerID = *CB->getPlayerID(); //TODO should be sth in callback
|
||||
wasWaitingForRealize = cb->waitTillRealize;
|
||||
wasUnlockingGs = CB->unlockGsWhenWaiting;
|
||||
CB->waitTillRealize = true;
|
||||
|
@ -215,7 +215,7 @@ void CStupidAI::battleNewRound(int round)
|
||||
|
||||
void CStupidAI::battleStackMoved(const CStack * stack, std::vector<BattleHex> dest, int distance)
|
||||
{
|
||||
print("battleStackMoved called");;
|
||||
print("battleStackMoved called");
|
||||
}
|
||||
|
||||
void CStupidAI::battleSpellCast(const BattleSpellCast *sc)
|
||||
|
@ -611,7 +611,7 @@ void removeGUI()
|
||||
logGlobal->infoStream() << "Removed GUI.";
|
||||
|
||||
LOCPLINT = nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
void processCommand(const std::string &message)
|
||||
{
|
||||
|
@ -781,7 +781,7 @@ void CSelectionScreen::toggleTab(CIntObject *tab)
|
||||
else
|
||||
{
|
||||
curTab = nullptr;
|
||||
};
|
||||
}
|
||||
GH.totalRedraw();
|
||||
}
|
||||
|
||||
|
@ -897,7 +897,7 @@ void CBattleInterface::bSpellf()
|
||||
//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));
|
||||
if (!blockingBonus)
|
||||
return;;
|
||||
return;
|
||||
|
||||
if (blockingBonus->source == Bonus::ARTIFACT)
|
||||
{
|
||||
|
@ -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;
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
CDefFile::~CDefFile() = default;
|
||||
|
||||
|
@ -607,7 +607,7 @@ void CFramerateManager::framerateDelay()
|
||||
fps = ceil(1000.0 / (accumulatedTime/accumulatedFrames));
|
||||
accumulatedTime = 0;
|
||||
accumulatedFrames = 0;
|
||||
};
|
||||
}
|
||||
|
||||
currentTicks = SDL_GetTicks();
|
||||
// recalculate timeElapsed for external calls via getElapsed()
|
||||
|
@ -139,7 +139,7 @@ SDL_Surface * CSDL_Ext::horizontalFlip(SDL_Surface * toRot)
|
||||
SDL_UnlockSurface(ret);
|
||||
SDL_UnlockSurface(toRot);
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
|
||||
Uint32 CSDL_Ext::SDL_GetPixel(SDL_Surface *surface, const int & x, const int & y, bool colorByte)
|
||||
{
|
||||
|
@ -997,7 +997,7 @@ void CCommanderArtPlace::createImage()
|
||||
|
||||
void CCommanderArtPlace::returnArtToHeroCallback()
|
||||
{
|
||||
ArtifactPosition artifactPos = commanderSlotID;;
|
||||
ArtifactPosition artifactPos = commanderSlotID;
|
||||
ArtifactPosition freeSlot = ourArt->firstBackpackSlot(commanderOwner);
|
||||
|
||||
ArtifactLocation src(commanderOwner->commander.get(), artifactPos);
|
||||
|
@ -84,7 +84,7 @@ void CGarrisonSlot::hover (bool on)
|
||||
temp = CGI->generaltexth->allTexts[481]; //Select %s
|
||||
}
|
||||
boost::algorithm::replace_first(temp,"%s",creature->nameSing);
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ CPicture::CPicture( const std::string &bmpname, int x, int y )
|
||||
{
|
||||
init();
|
||||
bg = BitmapHandler::loadBitmap(bmpname);
|
||||
freeSurf = true;;
|
||||
freeSurf = true;
|
||||
pos.x += x;
|
||||
pos.y += y;
|
||||
if(bg)
|
||||
@ -445,7 +445,7 @@ CCreatureAnim::CCreatureAnim(int x, int y, std::string name, Rect picPos, ui8 fl
|
||||
pos.w = picPos.w;
|
||||
if (picPos.h)
|
||||
pos.h = picPos.h;
|
||||
};
|
||||
}
|
||||
|
||||
void CCreatureAnim::loopPreview(bool warMachine)
|
||||
{
|
||||
|
@ -618,7 +618,7 @@ void CFocusable::moveFocus()
|
||||
if((*i)->active)
|
||||
{
|
||||
(*i)->giveFocus();
|
||||
break;;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ jclass CAndroidVMHelper::findClassloadedClass(const std::string & name)
|
||||
{
|
||||
auto env = get();
|
||||
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,
|
||||
|
@ -1050,7 +1050,7 @@ std::string Bonus::Description() const
|
||||
{
|
||||
case ARTIFACT:
|
||||
str << VLC->arth->artifacts[sid]->Name();
|
||||
break;;
|
||||
break;
|
||||
case SPELL_EFFECT:
|
||||
str << SpellID(sid).toSpell()->name;
|
||||
break;
|
||||
|
@ -256,7 +256,7 @@ bool JsonParser::extractEscaping(std::string &str)
|
||||
break; case 't': str += '\t';
|
||||
break; case '/': str += '/';
|
||||
break; default: return error("Unknown escape sequence!", true);
|
||||
};
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ void LibClasses::loadFilesystem()
|
||||
static void logHandlerLoaded(const std::string& name, CStopWatch &timer)
|
||||
{
|
||||
logGlobal->infoStream()<<"\t\t" << name << " handler: "<<timer.getDiff();
|
||||
};
|
||||
}
|
||||
|
||||
template <class Handler> void createHandler(Handler *&handler, const std::string &name, CStopWatch &timer)
|
||||
{
|
||||
|
@ -297,7 +297,7 @@ void CGDwelling::updateGuards() const
|
||||
const CCreature * crea = VLC->creh->creatures[creatureEntry.second.at(0)];
|
||||
|
||||
SlotID slot = getSlotFor(crea->idNumber);
|
||||
StackLocation stackLocation = StackLocation(this, slot);;
|
||||
StackLocation stackLocation = StackLocation(this, slot);
|
||||
if (hasStackAtSlot(slot)) //stack already exists, overwrite it
|
||||
{
|
||||
ChangeStackCount csc;
|
||||
|
@ -257,7 +257,7 @@ void CDrawRoadsOperation::updateTiles(std::set<int3> & invalidated)
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
bool CDrawRoadsOperation::tileHasSomething(const int3& pos) const
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ std::unique_ptr<CMap> CMapLoaderH3M::loadMap()
|
||||
mapHeader = std::unique_ptr<CMapHeader>(dynamic_cast<CMapHeader *>(map));
|
||||
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()
|
||||
@ -1409,7 +1409,7 @@ void CMapLoaderH3M::readObjects()
|
||||
|
||||
hp->setOwner(PlayerColor(reader.readUInt8()));
|
||||
|
||||
int htid = reader.readUInt8();; //hero type id
|
||||
int htid = reader.readUInt8(); //hero type id
|
||||
nobj->subID = htid;
|
||||
|
||||
if(htid == 0xff)
|
||||
|
@ -386,4 +386,4 @@ std::vector<JsonNode> CRmgTemplateStorage::loadLegacyData(size_t dataSize)
|
||||
{
|
||||
return std::vector<JsonNode>();
|
||||
//it would be cool to load old rmg.txt files
|
||||
};
|
||||
}
|
||||
|
@ -2003,7 +2003,7 @@ int3 CRmgTemplateZone::getAccessibleOffset(CMapGenerator* gen, ObjectTemplate &a
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -2545,7 +2545,7 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
|
||||
return obj;
|
||||
};
|
||||
oi.setTemplate(Obj::PANDORAS_BOX, 0, terrainType);
|
||||
oi.value = i * 5000;;
|
||||
oi.value = i * 5000;
|
||||
oi.probability = 5;
|
||||
possibleObjects.push_back(oi);
|
||||
}
|
||||
@ -2561,7 +2561,7 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
|
||||
return obj;
|
||||
};
|
||||
oi.setTemplate(Obj::PANDORAS_BOX, 0, terrainType);
|
||||
oi.value = i * 6000;;
|
||||
oi.value = i * 6000;
|
||||
oi.probability = 20;
|
||||
possibleObjects.push_back(oi);
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ void EarthquakeMechanics::applyBattleEffects(const SpellCastEnvironment * env, c
|
||||
if(bsr.stackIDs.size() > 0)
|
||||
env->sendAndApply(&bsr);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
env->sendAndApply(&ca);
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ std::vector<const CStack *> DefaultSpellMechanics::calculateAffectedStacks(const
|
||||
{
|
||||
if(const CStack * st = cb->battleGetStackByPos(hex, ctx.ti.onlyAlive))
|
||||
if(mainFilter(st))
|
||||
attackedCres.insert(st);;
|
||||
attackedCres.insert(st);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,7 +471,7 @@ namespace ERM
|
||||
qi::rule<Iterator, TVExp(), ascii::space_type> vexp;
|
||||
qi::rule<Iterator, TLine(), ascii::space_type> vline;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
ERM::TLine ERMParser::parseLine( const std::string & line, int realLineNo )
|
||||
{
|
||||
|
@ -6282,7 +6282,7 @@ void CGameHandler::removeAfterVisit(const CGObjectInstance *object)
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//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!");
|
||||
|
Loading…
Reference in New Issue
Block a user