summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/actiondef.h4
-rw-r--r--src/actormanager.cpp34
-rw-r--r--src/being/being.cpp52
-rw-r--r--src/being/castingeffect.cpp4
-rw-r--r--src/being/compoundsprite.cpp6
-rw-r--r--src/being/localplayer.cpp18
-rw-r--r--src/being/playerinfo.cpp8
-rw-r--r--src/configmanager.cpp14
-rw-r--r--src/configuration.cpp18
-rw-r--r--src/defaults.cpp2
-rw-r--r--src/effectmanager.cpp8
-rw-r--r--src/eventsmanager.cpp2
-rw-r--r--src/fs/files.cpp4
-rw-r--r--src/fs/paths.cpp2
-rw-r--r--src/fs/virtfs/fs.cpp66
-rw-r--r--src/fs/virtfs/fsdir.cpp32
-rw-r--r--src/fs/virtfs/fsdirrwops.cpp12
-rw-r--r--src/fs/virtfs/fszip.cpp6
-rw-r--r--src/fs/virtfs/rwops.cpp2
-rw-r--r--src/fs/virtfs/zipreader.cpp28
-rw-r--r--src/game.cpp30
-rw-r--r--src/gamemodifiers.cpp2
-rw-r--r--src/graphicsmanager.cpp230
-rw-r--r--src/gui/fonts/font.cpp8
-rw-r--r--src/gui/fonts/textchunk.cpp4
-rw-r--r--src/gui/gui.cpp20
-rw-r--r--src/gui/models/colormodel.cpp2
-rw-r--r--src/gui/popups/popupmenu.cpp2
-rw-r--r--src/gui/popups/statuspopup.cpp32
-rw-r--r--src/gui/skin.cpp4
-rw-r--r--src/gui/theme.cpp4
-rw-r--r--src/gui/widgets/attrs/attrdisplay.cpp2
-rw-r--r--src/gui/widgets/basiccontainer.cpp4
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/emotepage.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.cpp4
-rw-r--r--src/gui/widgets/popup.cpp2
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/progressindicator.cpp2
-rw-r--r--src/gui/widgets/scrollarea.cpp4
-rw-r--r--src/gui/widgets/selldialog.cpp2
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/slider.cpp2
-rw-r--r--src/gui/widgets/staticbrowserbox.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.cpp8
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp4
-rw-r--r--src/gui/widgets/tabs/mapdebugtab.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_audio.cpp4
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp12
-rw-r--r--src/gui/widgets/tabs/setup_joystick.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_misc.cpp8
-rw-r--r--src/gui/widgets/tabs/setup_perfomance.cpp4
-rw-r--r--src/gui/widgets/tabs/setup_players.cpp6
-rw-r--r--src/gui/widgets/tabs/setup_quick.cpp4
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp16
-rw-r--r--src/gui/widgets/tabs/setup_touch.cpp6
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp8
-rw-r--r--src/gui/widgets/tabs/setup_visual.cpp12
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.cpp2
-rw-r--r--src/gui/widgets/tabs/socialattacktab.h6
-rw-r--r--src/gui/widgets/tabs/socialpickuptab.h4
-rw-r--r--src/gui/widgets/tabs/socialtabbase.h2
-rw-r--r--src/gui/widgets/tabs/tab.cpp4
-rw-r--r--src/gui/widgets/window.cpp12
-rw-r--r--src/gui/widgets/windowcontainer.cpp2
-rw-r--r--src/gui/windowmanager.cpp36
-rw-r--r--src/gui/windows/buydialog.cpp4
-rw-r--r--src/gui/windows/changeemaildialog.cpp2
-rw-r--r--src/gui/windows/changepassworddialog.cpp2
-rw-r--r--src/gui/windows/charcreatedialog.cpp2
-rw-r--r--src/gui/windows/chatwindow.cpp8
-rw-r--r--src/gui/windows/clanwindow.cpp8
-rw-r--r--src/gui/windows/cutinwindow.cpp6
-rw-r--r--src/gui/windows/debugwindow.cpp8
-rw-r--r--src/gui/windows/didyouknowwindow.cpp2
-rw-r--r--src/gui/windows/emotewindow.cpp20
-rw-r--r--src/gui/windows/equipmentwindow.cpp6
-rw-r--r--src/gui/windows/inventorywindow.cpp8
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/logindialog.cpp4
-rw-r--r--src/gui/windows/maileditwindow.cpp2
-rw-r--r--src/gui/windows/mailviewwindow.cpp6
-rw-r--r--src/gui/windows/mailwindow.cpp6
-rw-r--r--src/gui/windows/ministatuswindow.cpp2
-rw-r--r--src/gui/windows/npcdialog.cpp38
-rw-r--r--src/gui/windows/questswindow.cpp4
-rw-r--r--src/gui/windows/quitdialog.cpp8
-rw-r--r--src/gui/windows/registerdialog.cpp2
-rw-r--r--src/gui/windows/serverdialog.cpp2
-rw-r--r--src/gui/windows/setupwindow.cpp4
-rw-r--r--src/gui/windows/shopwindow.cpp14
-rw-r--r--src/gui/windows/shortcutwindow.cpp4
-rw-r--r--src/gui/windows/skilldialog.cpp10
-rw-r--r--src/gui/windows/socialwindow.cpp10
-rw-r--r--src/gui/windows/statuswindow.cpp2
-rw-r--r--src/gui/windows/textcommandeditor.cpp6
-rw-r--r--src/gui/windows/textselectdialog.cpp2
-rw-r--r--src/gui/windows/tradewindow.cpp4
-rw-r--r--src/gui/windows/updaterwindow.cpp2
-rw-r--r--src/gui/windows/worldselectdialog.cpp2
-rw-r--r--src/input/inputmanager.cpp2
-rw-r--r--src/input/joystick.cpp2
-rw-r--r--src/input/touch/touchmanager.cpp6
-rw-r--r--src/maingui.cpp2
-rw-r--r--src/net/character.h2
-rw-r--r--src/net/ea/inventoryhandler.cpp4
-rw-r--r--src/net/ea/inventoryrecv.cpp2
-rw-r--r--src/net/ea/network.cpp6
-rw-r--r--src/net/ea/partyhandler.cpp2
-rw-r--r--src/net/eathena/beingrecv.cpp2
-rw-r--r--src/net/eathena/buysellrecv.cpp2
-rw-r--r--src/net/eathena/clanrecv.cpp6
-rw-r--r--src/net/eathena/elementalrecv.cpp4
-rw-r--r--src/net/eathena/generalhandler.cpp84
-rw-r--r--src/net/eathena/guildhandler.cpp2
-rw-r--r--src/net/eathena/guildrecv.cpp2
-rw-r--r--src/net/eathena/mail2handler.cpp2
-rw-r--r--src/net/eathena/mail2recv.cpp28
-rw-r--r--src/net/eathena/mailrecv.cpp6
-rw-r--r--src/net/eathena/mercenaryrecv.cpp4
-rw-r--r--src/net/eathena/network.cpp4
-rw-r--r--src/net/eathena/partyrecv.cpp2
-rw-r--r--src/net/eathena/playerrecv.cpp4
-rw-r--r--src/net/ipc.cpp4
-rw-r--r--src/net/net.cpp4
-rw-r--r--src/net/packetlimiter.cpp2
-rw-r--r--src/net/tmwa/buysellrecv.cpp2
-rw-r--r--src/net/tmwa/generalhandler.cpp82
-rw-r--r--src/net/tmwa/guildmanager.cpp8
-rw-r--r--src/particle/particle.cpp2
-rw-r--r--src/progs/dyecmd/client.cpp16
-rw-r--r--src/progs/manaplus/actions/actions.cpp2
-rw-r--r--src/progs/manaplus/actions/statusbar.cpp2
-rw-r--r--src/progs/manaplus/client.cpp46
-rw-r--r--src/progs/manaplus/gui/viewport.cpp2
-rw-r--r--src/render/mobileopengl2graphics.cpp4
-rw-r--r--src/render/mobileopenglgraphics.cpp2
-rw-r--r--src/render/modernopenglgraphics.cpp4
-rw-r--r--src/render/normalopenglgraphics.cpp4
-rw-r--r--src/render/openglx/mglxinit.cpp14
-rw-r--r--src/resources/animation/simpleanimation.cpp10
-rw-r--r--src/resources/atlas/atlasmanager.cpp4
-rw-r--r--src/resources/beinginfo.cpp4
-rw-r--r--src/resources/db/avatardb.cpp2
-rw-r--r--src/resources/db/clandb.cpp6
-rw-r--r--src/resources/db/colordb.cpp10
-rw-r--r--src/resources/db/commandsdb.cpp2
-rw-r--r--src/resources/db/deaddb.cpp2
-rw-r--r--src/resources/db/elementaldb.cpp4
-rw-r--r--src/resources/db/emotedb.cpp10
-rw-r--r--src/resources/db/groupdb.cpp28
-rw-r--r--src/resources/db/homunculusdb.cpp4
-rw-r--r--src/resources/db/horsedb.cpp10
-rw-r--r--src/resources/db/itemdb.cpp14
-rw-r--r--src/resources/db/itemfielddb.cpp10
-rw-r--r--src/resources/db/itemoptiondb.cpp6
-rw-r--r--src/resources/db/languagedb.cpp8
-rw-r--r--src/resources/db/mapdb.cpp4
-rw-r--r--src/resources/db/mercenarydb.cpp4
-rw-r--r--src/resources/db/moddb.cpp2
-rw-r--r--src/resources/db/monsterdb.cpp4
-rw-r--r--src/resources/db/networkdb.cpp2
-rw-r--r--src/resources/db/npcdb.cpp8
-rw-r--r--src/resources/db/npcdialogdb.cpp8
-rw-r--r--src/resources/db/palettedb.cpp2
-rw-r--r--src/resources/db/petdb.cpp6
-rw-r--r--src/resources/db/questdb.cpp2
-rw-r--r--src/resources/db/skillunitdb.cpp6
-rw-r--r--src/resources/db/sounddb.cpp2
-rw-r--r--src/resources/db/statdb.cpp10
-rw-r--r--src/resources/db/statuseffectdb.cpp4
-rw-r--r--src/resources/db/textdb.cpp2
-rw-r--r--src/resources/db/unitsdb.cpp4
-rw-r--r--src/resources/inventory/inventory.cpp10
-rw-r--r--src/resources/item/item.cpp4
-rw-r--r--src/resources/iteminfo.cpp8
-rw-r--r--src/resources/loaders/atlasloader.cpp2
-rw-r--r--src/resources/loaders/emptyatlasloader.cpp2
-rw-r--r--src/resources/loaders/imageloader.cpp4
-rw-r--r--src/resources/loaders/imagesetloader.cpp2
-rw-r--r--src/resources/loaders/musicloader.cpp2
-rw-r--r--src/resources/loaders/rescaledloader.cpp2
-rw-r--r--src/resources/loaders/shaderloader.cpp2
-rw-r--r--src/resources/loaders/shaderprogramloader.cpp2
-rw-r--r--src/resources/loaders/soundloader.cpp4
-rw-r--r--src/resources/loaders/subimageloader.cpp2
-rw-r--r--src/resources/loaders/walklayerloader.cpp2
-rw-r--r--src/resources/map/map.cpp22
-rw-r--r--src/resources/map/tileanimation.cpp2
-rw-r--r--src/resources/mapreader.cpp24
-rw-r--r--src/resources/openglimagehelper.cpp12
-rw-r--r--src/resources/resourcemanager/resourcemanager.cpp12
-rw-r--r--src/resources/sdl2imagehelper.cpp2
-rw-r--r--src/resources/sdlgfxblitfunc.cpp4
-rw-r--r--src/resources/sdlimagehelper.cpp8
-rw-r--r--src/resources/sprite/animatedsprite.cpp2
-rw-r--r--src/resources/sprite/spritedef.cpp28
-rw-r--r--src/soundmanager.cpp4
-rw-r--r--src/spellmanager.cpp2
-rw-r--r--src/test/testmain.cpp2
-rw-r--r--src/text.cpp2
-rw-r--r--src/unittests/gui/widgets/browserbox.cc2
-rw-r--r--src/unittests/gui/widgets/staticbrowserbox.cc2
-rw-r--r--src/unittests/gui/windowmanager.cc188
-rw-r--r--src/unittests/integrity.cc4
-rw-r--r--src/unittests/resources/dye/dye.cc6
-rw-r--r--src/unittests/resources/dye/dyepalette.cc2
-rw-r--r--src/unittests/resources/map/maplayer/drawfringenormal.cc4
-rw-r--r--src/unittests/resources/map/maplayer/drawfringesimple.cc4
-rw-r--r--src/unittests/resources/map/speciallayer.cc6
-rw-r--r--src/unittests/resources/resourcemanager/resourcemanager.cc6
-rw-r--r--src/unittests/resources/sdlimagehelper.cc6
-rw-r--r--src/unittests/resources/sprite/animatedsprite.cc2
-rw-r--r--src/unittests/sdl.cc6
-rw-r--r--src/unittests/utils/chatutils.cc6
-rw-r--r--src/unittests/utils/checkutils.cc4
-rw-r--r--src/unittests/utils/itemxmlutils.cc12
-rw-r--r--src/unittests/utils/translation/poparser.cc2
-rw-r--r--src/unittests/utils/xml.cc4
-rw-r--r--src/unittests/utils/xmlutils.cc18
-rw-r--r--src/utils/copynpaste.cpp2
-rw-r--r--src/utils/dumpsizes.cpp2
-rw-r--r--src/utils/itemxmlutils.cpp4
-rw-r--r--src/utils/pnglib.cpp8
-rw-r--r--src/utils/sdl2logger.cpp4
-rw-r--r--src/utils/sdlhelper.cpp4
-rw-r--r--src/utils/translation/translationmanager.cpp6
-rw-r--r--src/utils/xml/libxml.cpp10
-rw-r--r--src/utils/xml/pugixml.cpp6
-rw-r--r--src/utils/xml/tinyxml2.cpp6
233 files changed, 1085 insertions, 1083 deletions
diff --git a/src/actions/actiondef.h b/src/actions/actiondef.h
index 636d6eb6c..8d2cdd1e1 100644
--- a/src/actions/actiondef.h
+++ b/src/actions/actiondef.h
@@ -39,7 +39,7 @@ INPUT_INPUTMANAGER_H
#define callYellowBar(name) \
GameModifiers::name(!inputManager.isActionActive( \
InputAction::STOP_ATTACK)); \
- return true;
+ return true
#define callYellowBarCond(name) \
if (!settings.disableGameModifiers) \
@@ -48,6 +48,6 @@ INPUT_INPUTMANAGER_H
InputAction::STOP_ATTACK)); \
return true; \
} \
- return false;
+ return false
#endif // ACTIONS_ACTIONDEF_H
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 974eef64a..59bfd5bb3 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -332,7 +332,7 @@ Being *ActorManager::createBeing(const BeingId id,
case ActorType::FloorItem:
case ActorType::Avatar:
case ActorType::Unknown:
- reportAlways("CreateBeing for unknown type %d", CAST_S32(type));
+ reportAlways("CreateBeing for unknown type %d", CAST_S32(type))
break;
}
@@ -382,7 +382,7 @@ FloorItem *ActorManager::createItem(const BeingId id,
void ActorManager::destroy(ActorSprite *const actor)
{
- returnNullptrV(actor);
+ returnNullptrV(actor)
if (actor == localPlayer)
return;
@@ -392,7 +392,7 @@ void ActorManager::destroy(ActorSprite *const actor)
void ActorManager::erase(ActorSprite *const actor)
{
- returnNullptrV(actor);
+ returnNullptrV(actor)
if (actor == localPlayer)
return;
@@ -405,7 +405,7 @@ void ActorManager::erase(ActorSprite *const actor)
void ActorManager::undelete(const ActorSprite *const actor)
{
- returnNullptrV(actor);
+ returnNullptrV(actor)
if (actor == localPlayer)
return;
@@ -682,7 +682,7 @@ FloorItem *ActorManager::findItem(const BeingId id) const
if (it != mActorsIdMap.end())
{
ActorSprite *const actor = (*it).second;
- returnNullptr(nullptr, actor);
+ returnNullptr(nullptr, actor)
if (actor->getId() == id &&
actor->getType() == ActorType::FloorItem)
{
@@ -1922,14 +1922,14 @@ void ActorManager::removePickupItem(const std::string &name)
void ActorManager::addAttackMob(const std::string &name)
{
- addMobToList(name, AttackMob);
+ addMobToList(name, AttackMob)
rebuildPriorityAttackMobs();
storeAttackList();
}
void ActorManager::addPriorityAttackMob(const std::string &name)
{
- addMobToList(name, PriorityAttackMob);
+ addMobToList(name, PriorityAttackMob)
storeAttackList();
}
@@ -1944,7 +1944,7 @@ void ActorManager::addIgnoreAttackMob(const std::string &name)
void ActorManager::addPickupItem(const std::string &name)
{
- addMobToList(name, PickupItem);
+ addMobToList(name, PickupItem)
rebuildPickupItems();
storeAttackList();
}
@@ -1959,17 +1959,17 @@ void ActorManager::addIgnorePickupItem(const std::string &name)
void ActorManager::rebuildPriorityAttackMobs()
{
- rebuildMobsList(PriorityAttackMob);
+ rebuildMobsList(PriorityAttackMob)
}
void ActorManager::rebuildAttackMobs()
{
- rebuildMobsList(AttackMob);
+ rebuildMobsList(AttackMob)
}
void ActorManager::rebuildPickupItems()
{
- rebuildMobsList(PickupItem);
+ rebuildMobsList(PickupItem)
}
int ActorManager::getIndexByName(const std::string &name,
@@ -2019,9 +2019,9 @@ void ActorManager::loadAttackList()
std::list<std::string>::const_iterator i;
std::list<std::string>::const_iterator i_end;
- loadList("attackPriorityMobs", PriorityAttackMob);
- loadList("attackMobs", AttackMob);
- loadList("ignoreAttackMobs", IgnoreAttackMob);
+ loadList("attackPriorityMobs", PriorityAttackMob)
+ loadList("attackMobs", AttackMob)
+ loadList("ignoreAttackMobs", IgnoreAttackMob)
if (!empty)
{
mAttackMobs.push_back("");
@@ -2029,8 +2029,8 @@ void ActorManager::loadAttackList()
}
empty = false;
- loadList("pickupItems", PickupItem);
- loadList("ignorePickupItems", IgnorePickupItem);
+ loadList("pickupItems", PickupItem)
+ loadList("ignorePickupItems", IgnorePickupItem)
if (!empty)
{
mPickupItems.push_back("");
@@ -2101,7 +2101,7 @@ Being *ActorManager::cloneBeing(const Being *const srcBeing,
const int dx, const int dy,
const int id)
{
- returnNullptr(nullptr, srcBeing);
+ returnNullptr(nullptr, srcBeing)
Being *const dstBeing = actorManager->createBeing(fromInt(
toInt(srcBeing->getId(), int) + id, BeingId),
ActorType::Player,
diff --git a/src/being/being.cpp b/src/being/being.cpp
index d43912258..7fc270b22 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -346,16 +346,16 @@ Being::~Being()
mSpriteDraw = nullptr;
for_each_badges()
- delete2(mBadges[f]);
-
- delete2(mSpeechBubble);
- delete2(mDispName);
- delete2(mText);
- delete2(mEmotionSprite);
- delete2(mAnimationEffect);
- delete2(mCastingEffect);
+ delete2(mBadges[f])
+
+ delete2(mSpeechBubble)
+ delete2(mDispName)
+ delete2(mText)
+ delete2(mEmotionSprite)
+ delete2(mAnimationEffect)
+ delete2(mCastingEffect)
mBadgesCount = 0;
- delete2(mChat);
+ delete2(mChat)
removeHorse();
removeAllItemsParticles();
@@ -509,7 +509,7 @@ void Being::setSubtype(const BeingTypeId subtype,
case ActorType::FloorItem:
default:
reportAlways("Wrong being type %d in setSubType",
- CAST_S32(mType));
+ CAST_S32(mType))
break;
}
}
@@ -1117,7 +1117,7 @@ void Being::handleSkill(Being *restrict const victim,
void Being::showNameBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Name]);
+ delete2(mBadges[BadgeIndex::Name])
if (show &&
!mName.empty() &&
mShowBadges != BadgeDrawType::Hide)
@@ -1177,7 +1177,7 @@ void Being::setShowName(const bool doShowName) restrict2
void Being::showGuildBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Guild]);
+ delete2(mBadges[BadgeIndex::Guild])
if (show &&
!mGuildName.empty() &&
mShowBadges != BadgeDrawType::Hide)
@@ -1204,7 +1204,7 @@ void Being::setGuildName(const std::string &restrict name) restrict2
void Being::showClanBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Clan]);
+ delete2(mBadges[BadgeIndex::Clan])
if (show &&
!mClanName.empty() &&
mShowBadges != BadgeDrawType::Hide)
@@ -1860,7 +1860,7 @@ void Being::logic() restrict2
if (A_UNLIKELY(mCastEndTime != 0 && mCastEndTime < tick_time))
{
mCastEndTime = 0;
- delete2(mCastingEffect);
+ delete2(mCastingEffect)
}
if (A_UNLIKELY(mAnimationEffect))
@@ -2580,7 +2580,7 @@ void Being::showName() restrict2
if (mName.empty())
return;
- delete2(mDispName);
+ delete2(mDispName)
if (mHideErased && playerRelations.getRelation(mName) == Relation::ERASED)
return;
@@ -3645,7 +3645,7 @@ void Being::setGender(const GenderT gender) restrict2
void Being::showGmBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Gm]);
+ delete2(mBadges[BadgeIndex::Gm])
if (show &&
mIsGM &&
mShowBadges != BadgeDrawType::Hide &&
@@ -4945,7 +4945,7 @@ void Being::removeSpecialEffect() restrict2
mChildParticleEffects.removeLocally(mSpecialParticle);
mSpecialParticle = nullptr;
}
- delete2(mAnimationEffect);
+ delete2(mAnimationEffect)
}
void Being::updateAwayEffect() restrict2
@@ -5023,7 +5023,7 @@ void Being::setTileCoords(const int x, const int y) restrict2
void Being::setMap(Map *restrict const map) restrict2
{
mCastEndTime = 0;
- delete2(mCastingEffect);
+ delete2(mCastingEffect)
ActorSprite::setMap(map);
if (mMap != nullptr)
{
@@ -5196,7 +5196,7 @@ void Being::setTeamId(const uint16_t teamId) restrict2
void Being::showTeamBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Team]);
+ delete2(mBadges[BadgeIndex::Team])
if (show &&
mTeamId != 0U &&
mShowBadges != BadgeDrawType::Hide)
@@ -5225,7 +5225,7 @@ void Being::showBadges(const bool show) restrict2
void Being::showPartyBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Party]);
+ delete2(mBadges[BadgeIndex::Party])
if (show &&
!mPartyName.empty() &&
mShowBadges != BadgeDrawType::Hide)
@@ -5254,7 +5254,7 @@ void Being::setPartyName(const std::string &restrict name) restrict2
void Being::showShopBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Shop]);
+ delete2(mBadges[BadgeIndex::Shop])
if (show &&
mShop &&
mShowBadges != BadgeDrawType::Hide)
@@ -5273,7 +5273,7 @@ void Being::showShopBadge(const bool show) restrict2
void Being::showInactiveBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Inactive]);
+ delete2(mBadges[BadgeIndex::Inactive])
if (show &&
mInactive &&
mShowBadges != BadgeDrawType::Hide)
@@ -5292,7 +5292,7 @@ void Being::showInactiveBadge(const bool show) restrict2
void Being::showAwayBadge(const bool show) restrict2
{
- delete2(mBadges[BadgeIndex::Away]);
+ delete2(mBadges[BadgeIndex::Away])
if (show &&
mAway &&
mShowBadges != BadgeDrawType::Hide)
@@ -5382,7 +5382,7 @@ void Being::addCast(const int dstX,
SkillData *const data = skillDialog->getSkillDataByLevel(
skillId,
skillLevel);
- delete2(mCastingEffect);
+ delete2(mCastingEffect)
if (data != nullptr)
{
const std::string castingAnimation = data->castingAnimation;
@@ -5397,7 +5397,7 @@ void Being::addCast(const int dstX,
else
{
reportAlways("Want to draw casting for unknown skill %d",
- skillId);
+ skillId)
}
}
@@ -5556,7 +5556,7 @@ void Being::setLanguageId(const int lang) restrict2 noexcept2
{
if (lang != mLanguageId)
{
- delete2(mBadges[BadgeIndex::Lang]);
+ delete2(mBadges[BadgeIndex::Lang])
const std::string &badge = LanguageDb::getIcon(lang);
if (!badge.empty())
{
diff --git a/src/being/castingeffect.cpp b/src/being/castingeffect.cpp
index aa3e6a14d..17b0b177f 100644
--- a/src/being/castingeffect.cpp
+++ b/src/being/castingeffect.cpp
@@ -60,13 +60,13 @@ CastingEffect::CastingEffect(const int skillId,
reportAlways("Skill %d/%d casting animation '%s' load failed",
skillId,
skillLevel,
- animation.c_str());
+ animation.c_str())
}
}
CastingEffect::~CastingEffect()
{
- delete2(mSprite);
+ delete2(mSprite)
}
void CastingEffect::draw(Graphics *const graphics,
diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp
index 843c3b6b6..ebb4466b3 100644
--- a/src/being/compoundsprite.cpp
+++ b/src/being/compoundsprite.cpp
@@ -290,7 +290,7 @@ void CompoundSprite::removeSprite(const int layer)
if (mSprites[layer] == nullptr)
return;
- delete2(mSprites[layer]);
+ delete2(mSprites[layer])
mNeedsRedraw = true;
}
@@ -305,7 +305,7 @@ void CompoundSprite::clear()
mNeedsRedraw = true;
delete_all(imagesCache);
imagesCache.clear();
- delete2(mCacheItem);
+ delete2(mCacheItem)
mLastTime = 0;
}
@@ -368,7 +368,7 @@ void CompoundSprite::redraw() const
drawSpritesSDL(graphics, posX, posY);
- delete2(graphics);
+ delete2(graphics)
SDL_SetAlpha(surface, 0, SDL_ALPHA_OPAQUE);
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index d344926fa..ce0ab1e27 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -238,7 +238,7 @@ LocalPlayer::~LocalPlayer()
soundManager.volumeRestore();
delete2(mAwayDialog)
}
- delete2(mAwayListener);
+ delete2(mAwayListener)
}
void LocalPlayer::logic()
@@ -404,7 +404,7 @@ void LocalPlayer::setAction(const BeingActionT &action,
{
// TRANSLATORS: chat message after death
debugMsg(strprintf(_("You were killed by %s."),
- mLastHitFrom.c_str()));
+ mLastHitFrom.c_str()))
mLastHitFrom.clear();
}
setTarget(nullptr);
@@ -2340,12 +2340,12 @@ void LocalPlayer::setFollow(const std::string &player)
{
// TRANSLATORS: follow command message
std::string msg = strprintf(_("Follow: %s"), player.c_str());
- debugMsg(msg);
+ debugMsg(msg)
}
else
{
// TRANSLATORS: follow command message
- debugMsg(_("Follow canceled"));
+ debugMsg(_("Follow canceled"))
}
}
@@ -2356,12 +2356,12 @@ void LocalPlayer::setImitate(const std::string &player)
{
// TRANSLATORS: imitate command message
std::string msg = strprintf(_("Imitation: %s"), player.c_str());
- debugMsg(msg);
+ debugMsg(msg)
}
else
{
// TRANSLATORS: imitate command message
- debugMsg(_("Imitation canceled"));
+ debugMsg(_("Imitation canceled"))
}
}
@@ -2370,12 +2370,12 @@ void LocalPlayer::cancelFollow()
if (!mPlayerFollowed.empty())
{
// TRANSLATORS: cancel follow message
- debugMsg(_("Follow canceled"));
+ debugMsg(_("Follow canceled"))
}
if (!mPlayerImitated.empty())
{
// TRANSLATORS: cancel follow message
- debugMsg(_("Imitation canceled"));
+ debugMsg(_("Imitation canceled"))
}
mPlayerFollowed.clear();
mPlayerImitated.clear();
@@ -2733,7 +2733,7 @@ void LocalPlayer::checkNewName(Being *const being)
if (!mWaitFor.empty() && mWaitFor == nick)
{
// TRANSLATORS: wait player/monster message
- debugMsg(strprintf(_("You see %s"), mWaitFor.c_str()));
+ debugMsg(strprintf(_("You see %s"), mWaitFor.c_str()))
soundManager.playGuiSound(SOUND_INFO);
mWaitFor.clear();
}
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index 32a39e0c7..cb8fc195a 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -436,7 +436,7 @@ void init()
void deinit()
{
clearInventory();
- delete2(mMercenary);
+ delete2(mMercenary)
mPetBeingId = BeingId_zero;
}
@@ -460,9 +460,9 @@ bool isTalking()
void gameDestroyed()
{
- delete2(mInventory);
- delete2(mEquipment);
- delete2(mCartInventory);
+ delete2(mInventory)
+ delete2(mEquipment)
+ delete2(mCartInventory)
}
void stateChange(const StateT state)
diff --git a/src/configmanager.cpp b/src/configmanager.cpp
index ad3a5470a..6278ed3de 100644
--- a/src/configmanager.cpp
+++ b/src/configmanager.cpp
@@ -87,7 +87,7 @@ void ConfigManager::initServerConfig(const std::string &serverName)
else
{
reportAlways("Error creating server config: %s",
- configPath.c_str());
+ configPath.c_str())
}
const bool val = Client::isTmw();
@@ -160,7 +160,7 @@ void ConfigManager::initConfiguration()
if (configFile == nullptr)
{
reportAlways("Can't create %s. Using defaults.",
- configPath.c_str());
+ configPath.c_str())
}
else
{
@@ -429,10 +429,10 @@ void ConfigManager::checkConfigVersion()
const std::string prefix = std::string();
#endif // USE_SDL2
- unassignKey("keyDirectUp", "k108");
- unassignKey("keyDirectDown", "k59");
- unassignKey("keyDirectLeft", "k107");
- unassignKey("keyDirectRight", "k39");
+ unassignKey("keyDirectUp", "k108")
+ unassignKey("keyDirectDown", "k59")
+ unassignKey("keyDirectLeft", "k107")
+ unassignKey("keyDirectRight", "k39")
}
if (version < 12)
{
@@ -443,7 +443,7 @@ void ConfigManager::checkConfigVersion()
const std::string prefix = std::string();
#endif // USE_SDL2
- unassignKey("keyAttack", "k120");
+ unassignKey("keyAttack", "k120")
}
if (version < 13)
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 85c69e28b..79bb5041e 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -443,7 +443,7 @@ int Configuration::getIntValue(const std::string &key) const
reportAlways(
"%s: No integer value in registry for key %s",
mConfigPath.c_str(),
- key.c_str());
+ key.c_str())
}
}
else
@@ -462,7 +462,7 @@ int Configuration::resetIntValue(const std::string &key)
{
reportAlways("%s: No integer value in registry for key %s",
mConfigPath.c_str(),
- key.c_str());
+ key.c_str())
}
else
{
@@ -477,7 +477,7 @@ int Configuration::resetIntValue(const std::string &key)
{
reportAlways("%s: No integer value in registry for key %s",
mConfigPath.c_str(),
- key.c_str());
+ key.c_str())
}
}
setValue(key, defaultValue);
@@ -527,7 +527,7 @@ std::string Configuration::getStringValue(const std::string &key) const
{
reportAlways("%s: No string value in registry for key %s",
mConfigPath.c_str(),
- key.c_str());
+ key.c_str())
}
}
else
@@ -583,7 +583,7 @@ float Configuration::getFloatValue(const std::string &key) const
{
reportAlways("%s: No float value in registry for key %s",
mConfigPath.c_str(),
- key.c_str());
+ key.c_str())
}
}
else
@@ -651,7 +651,7 @@ bool Configuration::getBoolValue(const std::string &key) const
reportAlways(
"%s: No boolean value in registry for key %s",
mConfigPath.c_str(),
- key.c_str());
+ key.c_str())
}
}
else
@@ -672,7 +672,7 @@ bool Configuration::resetBoolValue(const std::string &key)
{
reportAlways("%s: No boolean value in registry for key %s",
mConfigPath.c_str(),
- key.c_str());
+ key.c_str())
}
else
{
@@ -686,7 +686,7 @@ bool Configuration::resetBoolValue(const std::string &key)
{
reportAlways("%s: No boolean value in registry for key %s",
mConfigPath.c_str(),
- key.c_str());
+ key.c_str())
}
}
@@ -870,7 +870,7 @@ void Configuration::write()
if (testFile == nullptr)
{
reportAlways("Configuration::write() couldn't open %s for writing",
- mConfigPath.c_str());
+ mConfigPath.c_str())
BLOCK_END("Configuration::write")
return;
}
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 27954fa9d..33ca98b76 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -84,7 +84,7 @@ VariableData* createData(const bool defData)
#define AddDEF(key, value) \
configData.insert(std::pair<std::string, VariableData*> \
- (key, createData(value)));
+ (key, createData(value)))
void setConfigDefaults(Configuration &cfg)
{
diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp
index e995280ff..b13699854 100644
--- a/src/effectmanager.cpp
+++ b/src/effectmanager.cpp
@@ -44,7 +44,7 @@ EffectManager::EffectManager() :
logger->log1("Effects are now loading");
loadXmlFile(paths.getStringValue("effectsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("effectsPatchFile"), SkipError_true);
- loadXmlDir("effectsPatchDir", loadXmlFile);
+ loadXmlDir("effectsPatchDir", loadXmlFile)
}
void EffectManager::loadXmlFile(const std::string &fileName,
@@ -143,7 +143,7 @@ bool EffectManager::trigger(const int id,
return rValue;
}
}
- reportAlways("Missing effect %d", id);
+ reportAlways("Missing effect %d", id)
BLOCK_END("EffectManager::trigger")
return rValue;
}
@@ -174,7 +174,7 @@ Particle *EffectManager::triggerReturn(const int id,
return rValue;
}
}
- reportAlways("Missing effect %d", id);
+ reportAlways("Missing effect %d", id)
return rValue;
}
@@ -207,7 +207,7 @@ bool EffectManager::trigger(const int id,
return rValue;
}
}
- reportAlways("Missing effect %d", id);
+ reportAlways("Missing effect %d", id)
return rValue;
}
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index 090cfdb82..986d9cf9e 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -537,7 +537,7 @@ void EventsManager::logEvent(const SDL_Event &event)
logger->assertLog("event: other: %u",
CAST_U32(event.type));
break;
- };
+ }
}
#ifdef USE_SDL2
diff --git a/src/fs/files.cpp b/src/fs/files.cpp
index ce7f663a3..ccec9ab87 100644
--- a/src/fs/files.cpp
+++ b/src/fs/files.cpp
@@ -236,7 +236,7 @@ bool Files::loadTextFileLocal(const std::string &fileName,
if (!file.is_open())
{
reportAlways("Couldn't load text file: %s",
- fileName.c_str());
+ fileName.c_str())
return false;
}
@@ -262,7 +262,7 @@ void Files::saveTextFile(const std::string &path,
else
{
reportAlways("Error opening file for writing: %s",
- fileName.c_str());
+ fileName.c_str())
}
file.close();
}
diff --git a/src/fs/paths.cpp b/src/fs/paths.cpp
index 8fb57330d..6c8d9f104 100644
--- a/src/fs/paths.cpp
+++ b/src/fs/paths.cpp
@@ -139,7 +139,7 @@ void prepareFsPath(std::string &path)
{
reportAlways("Path can be improved: '%s' -> '%s'",
path2.c_str(),
- path.c_str());
+ path.c_str())
}
#endif
}
diff --git a/src/fs/virtfs/fs.cpp b/src/fs/virtfs/fs.cpp
index c4faf02ed..697f28579 100644
--- a/src/fs/virtfs/fs.cpp
+++ b/src/fs/virtfs/fs.cpp
@@ -42,9 +42,9 @@
const char *dirSeparator = nullptr;
#ifdef UNITTESTS
-#define reportNonTests logger->log
+#define reportNonTests(a, b) logger->log(a, b);
#else // UNITTESTS
-#define reportNonTests reportAlways
+#define reportNonTests(a, b) reportAlways(a, b)
#endif // UNITTESTS
namespace VirtFs
@@ -126,7 +126,7 @@ namespace VirtFs
if (checkPath(name) == false)
{
reportAlways("FsDir::exists invalid path: %s",
- name.c_str());
+ name.c_str())
return false;
}
@@ -150,7 +150,7 @@ namespace VirtFs
if (checkPath(dirName) == false)
{
reportAlways("VirtFs::enumerateFiles invalid path: %s",
- dirName.c_str());
+ dirName.c_str())
return list;
}
@@ -175,7 +175,7 @@ namespace VirtFs
if (checkPath(dirName) == false)
{
reportAlways("VirtFs::enumerateFiles invalid path: %s",
- dirName.c_str());
+ dirName.c_str())
return;
}
@@ -197,7 +197,7 @@ namespace VirtFs
if (checkPath(dirName) == false)
{
reportAlways("VirtFs::enumerateFiles invalid path: %s",
- dirName.c_str());
+ dirName.c_str())
return;
}
@@ -220,7 +220,7 @@ namespace VirtFs
if (checkPath(dirName) == false)
{
reportAlways("VirtFs::enumerateFiles invalid path: %s",
- dirName.c_str());
+ dirName.c_str())
return;
}
@@ -241,7 +241,7 @@ namespace VirtFs
if (checkPath(name) == false)
{
reportAlways("VirtFs::isDirectory invalid path: %s",
- name.c_str());
+ name.c_str())
return false;
}
std::string dirName = STD_MOVE(name);
@@ -276,7 +276,7 @@ namespace VirtFs
if (checkPath(filename) == false)
{
reportAlways("VirtFs::openRead invalid path: %s",
- filename.c_str());
+ filename.c_str())
return nullptr;
}
FOR_EACH (STD_VECTOR<FsEntry*>::const_iterator, it, mEntries)
@@ -295,7 +295,7 @@ namespace VirtFs
if (checkPath(filename) == false)
{
reportAlways("VirtFs::openWrite invalid path: %s",
- filename.c_str());
+ filename.c_str())
return nullptr;
}
FOR_EACH (STD_VECTOR<FsEntry*>::const_iterator, it, mEntries)
@@ -314,7 +314,7 @@ namespace VirtFs
if (checkPath(filename) == false)
{
reportAlways("VirtFs::openAppend invalid path: %s",
- filename.c_str());
+ filename.c_str())
return nullptr;
}
FOR_EACH (STD_VECTOR<FsEntry*>::const_iterator, it, mEntries)
@@ -347,7 +347,7 @@ namespace VirtFs
{
if (newDir.find(".zip") != std::string::npos)
{
- reportAlways("Called FsDir::mount with zip archive");
+ reportAlways("Called FsDir::mount with zip archive")
return false;
}
std::string rootDir = newDir;
@@ -366,7 +366,7 @@ namespace VirtFs
if (entry != nullptr)
{
reportAlways("VirtFs::mount already exists: %s",
- newDir.c_str());
+ newDir.c_str())
return false;
}
if (subDir.empty())
@@ -396,7 +396,7 @@ namespace VirtFs
if (Files::existsLocal(newDir) == false)
{
reportNonTests("VirtFs::mount directory not exists: %s",
- newDir.c_str());
+ newDir.c_str())
return false;
}
return mountDirInternal(newDir, dirSeparator, append);
@@ -411,7 +411,7 @@ namespace VirtFs
if (Files::existsLocal(newDir) == false)
{
reportNonTests("VirtFs::mount directory not exists: %s",
- newDir.c_str());
+ newDir.c_str())
return false;
}
return mountDirInternal(newDir, subDir, append);
@@ -519,13 +519,13 @@ namespace VirtFs
prepareFsPath(oldDir);
if (oldDir.find(".zip") != std::string::npos)
{
- reportAlways("Called unmount with zip archive");
+ reportAlways("Called unmount with zip archive")
return false;
}
if (unmountDirInternal(oldDir, std::string()) == false)
{
reportAlways("VirtFs::unmountDir not exists: %s",
- oldDir.c_str());
+ oldDir.c_str())
return false;
}
return true;
@@ -537,14 +537,14 @@ namespace VirtFs
prepareFsPath(oldDir);
if (oldDir.find(".zip") != std::string::npos)
{
- reportAlways("Called unmount with zip archive");
+ reportAlways("Called unmount with zip archive")
return false;
}
prepareFsPath(subDir);
if (unmountDirInternal(oldDir, subDir) == false)
{
reportAlways("VirtFs::unmountDir not exists: %s",
- oldDir.c_str());
+ oldDir.c_str())
return false;
}
return true;
@@ -555,7 +555,7 @@ namespace VirtFs
prepareFsPath(oldDir);
if (oldDir.find(".zip") != std::string::npos)
{
- reportAlways("Called unmount with zip archive");
+ reportAlways("Called unmount with zip archive")
return false;
}
if (unmountDirInternal(oldDir, std::string()) == false)
@@ -573,7 +573,7 @@ namespace VirtFs
prepareFsPath(oldDir);
if (oldDir.find(".zip") != std::string::npos)
{
- reportAlways("Called unmount with zip archive");
+ reportAlways("Called unmount with zip archive")
return false;
}
prepareFsPath(subDir);
@@ -593,19 +593,19 @@ namespace VirtFs
if (Files::existsLocal(newDir) == false)
{
reportNonTests("FsZip::mount file not exists: %s",
- newDir.c_str());
+ newDir.c_str())
return false;
}
if (findLast(newDir, ".zip") == false)
{
reportAlways("Called VirtFs::mount without "
- "zip archive");
+ "zip archive")
return false;
}
if (searchByRootInternal(newDir, std::string()) != nullptr)
{
reportAlways("FsZip::mount already exists: %s",
- newDir.c_str());
+ newDir.c_str())
return false;
}
ZipEntry *const entry = new ZipEntry(newDir,
@@ -630,13 +630,13 @@ namespace VirtFs
if (Files::existsLocal(newDir) == false)
{
reportNonTests("FsZip::mount file not exists: %s",
- newDir.c_str());
+ newDir.c_str())
return false;
}
if (findLast(newDir, ".zip") == false)
{
reportAlways("Called VirtFs::mount without "
- "zip archive");
+ "zip archive")
return false;
}
prepareFsPath(subDir);
@@ -652,7 +652,7 @@ namespace VirtFs
if (searchByRootInternal(newDir, subDir) != nullptr)
{
reportAlways("FsZip::mount already exists: %s",
- newDir.c_str());
+ newDir.c_str())
return false;
}
ZipEntry *const entry = new ZipEntry(newDir,
@@ -676,7 +676,7 @@ namespace VirtFs
prepareFsPath(oldDir);
if (findLast(oldDir, ".zip") == false)
{
- reportAlways("Called unmount without zip archive");
+ reportAlways("Called unmount without zip archive")
return false;
}
FOR_EACH (STD_VECTOR<FsEntry*>::iterator, it, mEntries)
@@ -696,7 +696,7 @@ namespace VirtFs
}
reportAlways("VirtFs::unmountZip not exists: %s",
- oldDir.c_str());
+ oldDir.c_str())
return false;
}
@@ -706,7 +706,7 @@ namespace VirtFs
prepareFsPath(oldDir);
if (findLast(oldDir, ".zip") == false)
{
- reportAlways("Called unmount without zip archive");
+ reportAlways("Called unmount without zip archive")
return false;
}
prepareFsPath(subDir);
@@ -738,7 +738,7 @@ namespace VirtFs
}
reportAlways("VirtFs::unmountZip not exists: %s",
- oldDir.c_str());
+ oldDir.c_str())
return false;
}
@@ -748,7 +748,7 @@ namespace VirtFs
if (checkPath(fileName) == false)
{
reportAlways("FsDir::getRealDir invalid path: %s",
- fileName.c_str());
+ fileName.c_str())
return std::string();
}
@@ -862,7 +862,7 @@ namespace VirtFs
if (checkPath(filename) == false)
{
reportAlways("VirtFs::loadFile invalid path: %s",
- filename.c_str());
+ filename.c_str())
return nullptr;
}
FOR_EACH (STD_VECTOR<FsEntry*>::const_iterator, it, mEntries)
diff --git a/src/fs/virtfs/fsdir.cpp b/src/fs/virtfs/fsdir.cpp
index dae2a9eb1..d6beae6c4 100644
--- a/src/fs/virtfs/fsdir.cpp
+++ b/src/fs/virtfs/fsdir.cpp
@@ -73,7 +73,7 @@ namespace FsDir
if (fd == FILEHDEFAULT)
{
reportAlways("VirtFs::open file open error: %s",
- filename.c_str());
+ filename.c_str())
return nullptr;
}
return new File(&funcs, fd);
@@ -252,7 +252,7 @@ namespace FsDir
if (checkPath(name) == false)
{
reportAlways("FsDir::isSymbolicLink invalid path: %s",
- name.c_str());
+ name.c_str())
return false;
}
#ifndef WIN32
@@ -286,7 +286,7 @@ namespace FsDir
prepareFsPath(dirname);
if (mWriteDir.empty())
{
- reportAlways("FsDir::mkdir write dir is empty");
+ reportAlways("FsDir::mkdir write dir is empty")
return false;
}
return mkdir_r((mWriteDir + dirname).c_str()) != -1;
@@ -297,7 +297,7 @@ namespace FsDir
prepareFsPath(filename);
if (mWriteDir.empty())
{
- reportAlways("FsDir::remove write dir is empty");
+ reportAlways("FsDir::remove write dir is empty")
return false;
}
return ::remove((mWriteDir + filename).c_str()) != 0;
@@ -326,7 +326,7 @@ namespace FsDir
FILEHTYPE fd = file->mFd;
if (fd == FILEHDEFAULT)
{
- reportAlways("FsDir::read file not opened.");
+ reportAlways("FsDir::read file not opened.")
return 0;
}
#ifdef USE_FILE_FOPEN
@@ -350,7 +350,7 @@ namespace FsDir
FILEHTYPE fd = file->mFd;
if (fd == FILEHDEFAULT)
{
- reportAlways("FsDir::write file not opened.");
+ reportAlways("FsDir::write file not opened.")
return 0;
}
#ifdef USE_FILE_FOPEN
@@ -371,14 +371,14 @@ namespace FsDir
FILEHTYPE fd = file->mFd;
if (fd == FILEHDEFAULT)
{
- reportAlways("FsDir::fileLength file not opened.");
+ reportAlways("FsDir::fileLength file not opened.")
return 0;
}
#ifdef USE_FILE_FOPEN
const long pos = ftell(fd);
if (pos < 0)
{
- reportAlways("FsDir::fileLength ftell error.");
+ reportAlways("FsDir::fileLength ftell error.")
return -1;
}
fseek(fd, 0, SEEK_END);
@@ -389,7 +389,7 @@ namespace FsDir
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
{
- reportAlways("FsDir::fileLength error.");
+ reportAlways("FsDir::fileLength error.")
return -1;
}
return static_cast<int64_t>(statbuf.st_size);
@@ -404,7 +404,7 @@ namespace FsDir
FILEHTYPE fd = file->mFd;
if (fd == FILEHDEFAULT)
{
- reportAlways("FsDir::tell file not opened.");
+ reportAlways("FsDir::tell file not opened.")
return 0;
}
#ifdef USE_FILE_FOPEN
@@ -423,7 +423,7 @@ namespace FsDir
FILEHTYPE fd = file->mFd;
if (fd == FILEHDEFAULT)
{
- reportAlways("FsDir::seek file not opened.");
+ reportAlways("FsDir::seek file not opened.")
return 0;
}
const int64_t res = FILESEEK(fd, pos, SEEK_SET);
@@ -440,7 +440,7 @@ namespace FsDir
FILEHTYPE fd = file->mFd;
if (fd == FILEHDEFAULT)
{
- reportAlways("FsDir::eof file not opened.");
+ reportAlways("FsDir::eof file not opened.")
return 0;
}
#ifdef USE_FILE_FOPEN
@@ -454,7 +454,7 @@ namespace FsDir
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
{
- reportAlways("FsDir::fileLength error.");
+ reportAlways("FsDir::fileLength error.")
return -1;
}
const int64_t len = static_cast<int64_t>(statbuf.st_size);
@@ -475,7 +475,7 @@ namespace FsDir
if (fd == FILEHDEFAULT)
{
reportAlways("VirtFs::loadFile file open error: %s",
- filename.c_str());
+ filename.c_str())
return nullptr;
}
@@ -488,7 +488,7 @@ namespace FsDir
const long sz = ftell(fd);
if (sz < 0)
{
- reportAlways("FsDir::fileLength ftell error.");
+ reportAlways("FsDir::fileLength ftell error.")
if (fd != FILEHDEFAULT)
FILECLOSE(fd);
return nullptr;
@@ -499,7 +499,7 @@ namespace FsDir
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
{
- reportAlways("FsDir::fileLength error.");
+ reportAlways("FsDir::fileLength error.")
if (fd != FILEHDEFAULT)
FILECLOSE(fd);
return nullptr;
diff --git a/src/fs/virtfs/fsdirrwops.cpp b/src/fs/virtfs/fsdirrwops.cpp
index 9906e1895..480567288 100644
--- a/src/fs/virtfs/fsdirrwops.cpp
+++ b/src/fs/virtfs/fsdirrwops.cpp
@@ -87,7 +87,7 @@ namespace FsDir
const long curpos = ftell(fd);
if (curpos < 0)
{
- reportAlways("FsDir::fileLength ftell error.");
+ reportAlways("FsDir::fileLength ftell error.")
return -1;
}
fseek(fd, 0, SEEK_END);
@@ -97,7 +97,7 @@ namespace FsDir
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
{
- reportAlways("FsDir::fileLength error.");
+ reportAlways("FsDir::fileLength error.")
len = -1;
}
else
@@ -111,7 +111,7 @@ namespace FsDir
#ifdef USE_FILE_FOPEN
if (fseek(fd, curpos, SEEK_SET) < 0)
{
- reportAlways("FsDir::fileLength fseek error.");
+ reportAlways("FsDir::fileLength fseek error.")
}
#endif // USE_FILE_FOPEN
logger->assertLog(
@@ -184,7 +184,7 @@ namespace FsDir
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
{
- reportAlways("FsDir::fileLength error.");
+ reportAlways("FsDir::fileLength error.")
return CAST_S32(rc);
}
}
@@ -220,7 +220,7 @@ namespace FsDir
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
{
- reportAlways("FsDir::fileLength error.");
+ reportAlways("FsDir::fileLength error.")
return CAST_S32(rc);
}
}
@@ -256,7 +256,7 @@ namespace FsDir
struct stat statbuf;
if (fstat(fd, &statbuf) == -1)
{
- reportAlways("FsDir::fileLength error.");
+ reportAlways("FsDir::fileLength error.")
return -1;
}
return static_cast<int64_t>(statbuf.st_size);
diff --git a/src/fs/virtfs/fszip.cpp b/src/fs/virtfs/fszip.cpp
index 871e3cc1a..42fe808d0 100644
--- a/src/fs/virtfs/fszip.cpp
+++ b/src/fs/virtfs/fszip.cpp
@@ -568,14 +568,14 @@ namespace FsZip
File *openWrite(FsEntry *restrict const entry A_UNUSED,
const std::string &filename A_UNUSED)
{
- reportAlways("VirtFs::openWrite for zip not implemented.");
+ reportAlways("VirtFs::openWrite for zip not implemented.")
return nullptr;
}
File *openAppend(FsEntry *restrict const entry A_UNUSED,
const std::string &filename A_UNUSED)
{
- reportAlways("VirtFs::openAppend for zip not implemented.");
+ reportAlways("VirtFs::openAppend for zip not implemented.")
return nullptr;
}
@@ -600,7 +600,7 @@ namespace FsZip
}
if (buffer == nullptr)
{
- reportAlways("FsZip::read buffer is null");
+ reportAlways("FsZip::read buffer is null")
return 0;
}
const size_t pos = file->mPos;
diff --git a/src/fs/virtfs/rwops.cpp b/src/fs/virtfs/rwops.cpp
index 96c3cddd6..c6ad34eff 100644
--- a/src/fs/virtfs/rwops.cpp
+++ b/src/fs/virtfs/rwops.cpp
@@ -69,7 +69,7 @@ SDL_RWops *create_rwops(File *const file,
if (file == nullptr)
{
reportAlways("VirtFs::rwops_seek: create rwops error: %s",
- fname.c_str());
+ fname.c_str())
}
else
{
diff --git a/src/fs/virtfs/zipreader.cpp b/src/fs/virtfs/zipreader.cpp
index e76b219b2..ec3420946 100644
--- a/src/fs/virtfs/zipreader.cpp
+++ b/src/fs/virtfs/zipreader.cpp
@@ -51,8 +51,8 @@ extern const char *dirSeparator;
if (cnt != (sz)) \
{ \
reportAlways("Error reading " msg " in file %s", \
- archiveName.c_str()); \
- delete2(header); \
+ archiveName.c_str()) \
+ delete2(header) \
delete [] buf; \
fclose(arcFile); \
return false; \
@@ -75,7 +75,7 @@ namespace ZipReader
{
if (entry == nullptr)
{
- reportAlways("Entry is null.");
+ reportAlways("Entry is null.")
return false;
}
const std::string archiveName = entry->root;
@@ -86,7 +86,7 @@ namespace ZipReader
if (arcFile == nullptr)
{
reportAlways("Can't open zip file %s",
- archiveName.c_str());
+ archiveName.c_str())
return false;
}
uint8_t *const buf = new uint8_t[65535 + 10];
@@ -104,7 +104,7 @@ namespace ZipReader
size_t cnt = 0U;
// file header pointer on 0
// read file header signature
- readVal(buf, 4, "zip file header"); // + 4
+ readVal(buf, 4, "zip file header") // + 4
// pointer on 4
if (buf[0] == 0x50 &&
@@ -138,7 +138,7 @@ namespace ZipReader
if (fileNameLen > 1000)
{
reportAlways("Error too long file name in file %s",
- archiveName.c_str());
+ archiveName.c_str())
delete header;
delete [] buf;
fclose(arcFile);
@@ -148,7 +148,7 @@ namespace ZipReader
swapVal16(val16)
// file header pointer on 30
const uint32_t extraFieldLen = CAST_U32(val16);
- readVal(buf, fileNameLen, "file name");
+ readVal(buf, fileNameLen, "file name")
// file header pointer on 30 + fileNameLen
buf[fileNameLen] = 0;
header->fileName = std::string(
@@ -178,7 +178,7 @@ namespace ZipReader
header->fileName.c_str());
#endif // DEBUG_ZIP
dirs.push_back(header->fileName);
- delete2(header);
+ delete2(header)
}
}
else if (buf[0] == 0x50 &&
@@ -209,7 +209,7 @@ namespace ZipReader
buf[1],
buf[2],
buf[3],
- archiveName.c_str());
+ archiveName.c_str())
delete [] buf;
fclose(arcFile);
return false;
@@ -225,7 +225,7 @@ namespace ZipReader
{
reportAlways("Zlib error: '%s' in %s",
text.c_str(),
- getZlibError(err).c_str());
+ getZlibError(err).c_str())
}
std::string getZlibError(const int err)
@@ -243,7 +243,7 @@ namespace ZipReader
{
if (header == nullptr)
{
- reportAlways("ZipReader::readCompressedFile: header is null");
+ reportAlways("ZipReader::readCompressedFile: header is null")
return nullptr;
}
FILE *restrict const arcFile = fopen(
@@ -252,7 +252,7 @@ namespace ZipReader
if (arcFile == nullptr)
{
reportAlways("Can't open zip file %s",
- header->zipEntry->root.c_str());
+ header->zipEntry->root.c_str())
return nullptr;
}
@@ -263,7 +263,7 @@ namespace ZipReader
compressSize)
{
reportAlways("Read zip compressed file error from archive: %s",
- header->zipEntry->root.c_str());
+ header->zipEntry->root.c_str())
fclose(arcFile);
delete [] buf;
return nullptr;
@@ -276,7 +276,7 @@ namespace ZipReader
{
if (header == nullptr)
{
- reportAlways("Open zip file error. header is null.");
+ reportAlways("Open zip file error. header is null.")
return nullptr;
}
uint8_t *restrict const in = readCompressedFile(header);
diff --git a/src/game.cpp b/src/game.cpp
index dec8874cf..de782a3a7 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -311,7 +311,7 @@ static void createGuiWindows()
IgnoreRecord_false,
TryRemoveColors_true);
}
- delete2(assertListener);
+ delete2(assertListener)
}
if (config.getBoolValue("enableTradeTab"))
chatWindow->addSpecialChannelTab(TRADE_CHANNEL, false);
@@ -357,20 +357,20 @@ static void destroyGuiWindows()
GuildManager::clear();
#endif // TMWA_SUPPORT
- delete2(windowMenu);
+ delete2(windowMenu)
delete2(localChatTab) // Need to do this first, so it can remove itself
delete2(debugChatTab)
delete2(tradeChatTab)
delete2(battleChatTab)
delete2(langChatTab)
- delete2(gmChatTab);
+ delete2(gmChatTab)
#ifdef TMWA_SUPPORT
if (guildManager != nullptr && GuildManager::getEnableGuildBot())
guildManager->reload();
#endif // TMWA_SUPPORT
logger->log("start deleting");
- delete2(emoteWindow);
+ delete2(emoteWindow)
delete2(chatWindow)
logger->log("end deleting");
delete2(statusWindow)
@@ -388,15 +388,15 @@ static void destroyGuiWindows()
delete2(emoteShortcutWindow)
delete2(outfitWindow)
delete2(socialWindow)
- delete2(dropShortcutWindow);
- delete2(spellShortcutWindow);
- delete2(bankWindow);
- delete2(cutInWindow);
- delete2(mailWindow);
- delete2(questsWindow);
- delete2(whoIsOnline);
- delete2(killStats);
- delete2(clanWindow);
+ delete2(dropShortcutWindow)
+ delete2(spellShortcutWindow)
+ delete2(bankWindow)
+ delete2(cutInWindow)
+ delete2(mailWindow)
+ delete2(questsWindow)
+ delete2(whoIsOnline)
+ delete2(killStats)
+ delete2(clanWindow)
}
Game *Game::mInstance = nullptr;
@@ -508,8 +508,8 @@ Game::~Game()
delete2(mumbleManager)
#endif // USE_MUMBLE
- delete2(crazyMoves);
- delete2(emptyBeingSlot);
+ delete2(crazyMoves)
+ delete2(emptyBeingSlot)
Being::clearCache();
mInstance = nullptr;
diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp
index f3e9dbdd0..9badf5b42 100644
--- a/src/gamemodifiers.cpp
+++ b/src/gamemodifiers.cpp
@@ -131,7 +131,7 @@ void GameModifiers::changeMode(unsigned *restrict const var,
GameModifierListener::distributeEvent();
const std::string str = (*func)();
if (str.size() > 4)
- debugMsg(str.substr(4));
+ debugMsg(str.substr(4))
}
const char *GameModifiers::getVarItem(const char *const *const arr,
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 42bbc73a0..599466aba 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -105,8 +105,10 @@ PRAGMA48(GCC diagnostic pop)
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
#endif // GL_MAX_RENDERBUFFER_SIZE
#define useCompression(name) \
- OpenGLImageHelper::setInternalTextureType(name); \
- logger->log("using " #name " texture compression");
+ { \
+ OpenGLImageHelper::setInternalTextureType(name); \
+ logger->log("using " #name " texture compression"); \
+ }
#endif // USE_OPENGL
GraphicsManager graphicsManager;
@@ -378,7 +380,7 @@ void GraphicsManager::createRenderers()
case RENDER_SDL2_DEFAULT:
RENDER_SDL2_DEFAULT_INIT
break;
- };
+ }
mUseAtlases = (useOpenGL == RENDER_NORMAL_OPENGL ||
useOpenGL == RENDER_SAFE_OPENGL ||
useOpenGL == RENDER_MODERN_OPENGL ||
@@ -440,11 +442,11 @@ void GraphicsManager::createRenderers()
void GraphicsManager::deleteRenderers()
{
- delete2(mainGraphics);
+ delete2(mainGraphics)
if (imageHelper != surfaceImageHelper)
delete surfaceImageHelper;
surfaceImageHelper = nullptr;
- delete2(imageHelper);
+ delete2(imageHelper)
}
void GraphicsManager::setVideoMode()
@@ -641,7 +643,7 @@ void GraphicsManager::updateExtensions()
logger->log1("opengl extensions: ");
if (checkGLVersion(3, 0))
{ // get extensions in new way
- assignFunction2(glGetStringi, "glGetStringi");
+ assignFunction2(glGetStringi, "glGetStringi")
std::string extList;
int num = 0;
glGetIntegerv(GL_NUM_EXTENSIONS, &num);
@@ -669,7 +671,7 @@ void GraphicsManager::updateExtensions()
void GraphicsManager::updatePlanformExtensions()
{
SDL_SysWMinfo info;
- SDL_VERSION(&info.version);
+ SDL_VERSION(&info.version)
if (SDL::getWindowWMInfo(mainGraphics->getWindow(), &info))
{
#ifdef WIN32
@@ -777,7 +779,7 @@ void GraphicsManager::updateTextureCompressionFormat() const
if (compressionFormat == 1)
{
delete []formats;
- useCompression(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT);
+ useCompression(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT)
return;
}
break;
@@ -785,7 +787,7 @@ void GraphicsManager::updateTextureCompressionFormat() const
if (compressionFormat == 2)
{
delete []formats;
- useCompression(GL_COMPRESSED_RGBA_FXT1_3DFX);
+ useCompression(GL_COMPRESSED_RGBA_FXT1_3DFX)
return;
}
break;
@@ -793,7 +795,7 @@ void GraphicsManager::updateTextureCompressionFormat() const
if (compressionFormat == 4)
{
delete []formats;
- useCompression(GL_COMPRESSED_RGBA_BPTC_UNORM_ARB);
+ useCompression(GL_COMPRESSED_RGBA_BPTC_UNORM_ARB)
return;
}
break;
@@ -804,7 +806,7 @@ void GraphicsManager::updateTextureCompressionFormat() const
if (compressionFormat == 3)
{
delete []formats;
- useCompression(GL_COMPRESSED_RGBA_ARB);
+ useCompression(GL_COMPRESSED_RGBA_ARB)
return;
}
@@ -813,7 +815,7 @@ void GraphicsManager::updateTextureCompressionFormat() const
&& supportExtension("GL_ARB_texture_compression_bptc"))
{
delete []formats;
- useCompression(GL_COMPRESSED_RGBA_BPTC_UNORM_ARB);
+ useCompression(GL_COMPRESSED_RGBA_BPTC_UNORM_ARB)
return;
}
}
@@ -1023,10 +1025,10 @@ void GraphicsManager::initOpenGLFunctions()
if (is10 && (is33 || supportExtension("GL_ARB_sampler_objects")))
{
logger->log1("found GL_ARB_sampler_objects");
- assignFunction(glGenSamplers);
- assignFunction(glDeleteSamplers);
- assignFunction(glBindSampler);
- assignFunction(glSamplerParameteri);
+ assignFunction(glGenSamplers)
+ assignFunction(glDeleteSamplers)
+ assignFunction(glBindSampler)
+ assignFunction(glSamplerParameteri)
if (isGLNotNull(mglGenSamplers)
&& config.getBoolValue("useTextureSampler"))
{
@@ -1076,19 +1078,19 @@ void GraphicsManager::initOpenGLFunctions()
if (is45)
{
logger->log1("found GL_EXT_direct_state_access");
- assignFunction(glTextureSubImage2D);
+ assignFunction(glTextureSubImage2D)
}
else if (supportExtension("GL_EXT_direct_state_access"))
{
logger->log1("found GL_EXT_direct_state_access");
assignFunctionEmu2(glTextureSubImage2DEXT,
- "glTextureSubImage2DEXT");
+ "glTextureSubImage2DEXT")
}
else if (supportExtension("GL_ARB_direct_state_access"))
{
logger->log1("found GL_ARB_direct_state_access");
logger->log1("GL_EXT_direct_state_access not found");
- assignFunction(glTextureSubImage2D);
+ assignFunction(glTextureSubImage2D)
}
else
{
@@ -1107,7 +1109,7 @@ void GraphicsManager::initOpenGLFunctions()
if (is12 && (is42 || supportExtension("GL_ARB_texture_storage")))
{
logger->log1("found GL_ARB_texture_storage");
- assignFunction(glTexStorage2D);
+ assignFunction(glTexStorage2D)
}
else
{
@@ -1117,7 +1119,7 @@ void GraphicsManager::initOpenGLFunctions()
if (is13 || supportExtension("GL_ARB_multitexture"))
{
logger->log1("found GL_ARB_multitexture or OpenGL 1.3");
- assignFunction(glActiveTexture);
+ assignFunction(glActiveTexture)
}
else
{
@@ -1128,7 +1130,7 @@ void GraphicsManager::initOpenGLFunctions()
if (is20 || supportExtension("GL_ARB_explicit_attrib_location"))
{
logger->log1("found GL_ARB_explicit_attrib_location or OpenGL 2.0");
- assignFunction(glBindAttribLocation);
+ assignFunction(glBindAttribLocation)
}
else
{
@@ -1138,29 +1140,29 @@ void GraphicsManager::initOpenGLFunctions()
if (is30 || supportExtension("GL_ARB_framebuffer_object"))
{ // frame buffer supported
logger->log1("found GL_ARB_framebuffer_object");
- assignFunction(glGenRenderbuffers);
- assignFunction(glBindRenderbuffer);
- assignFunction(glRenderbufferStorage);
- assignFunction(glGenFramebuffers);
- assignFunction(glBindFramebuffer);
- assignFunction(glFramebufferTexture2D);
- assignFunction(glFramebufferRenderbuffer);
- assignFunction(glDeleteFramebuffers);
- assignFunction(glDeleteRenderbuffers);
- assignFunction(glCheckFramebufferStatus);
+ assignFunction(glGenRenderbuffers)
+ assignFunction(glBindRenderbuffer)
+ assignFunction(glRenderbufferStorage)
+ assignFunction(glGenFramebuffers)
+ assignFunction(glBindFramebuffer)
+ assignFunction(glFramebufferTexture2D)
+ assignFunction(glFramebufferRenderbuffer)
+ assignFunction(glDeleteFramebuffers)
+ assignFunction(glDeleteRenderbuffers)
+ assignFunction(glCheckFramebufferStatus)
}
else if (supportExtension("GL_EXT_framebuffer_object"))
{ // old frame buffer extension
logger->log1("found GL_EXT_framebuffer_object");
- assignFunctionEXT(glGenRenderbuffers);
- assignFunctionEXT(glBindRenderbuffer);
- assignFunctionEXT(glRenderbufferStorage);
- assignFunctionEXT(glGenFramebuffers);
- assignFunctionEXT(glBindFramebuffer);
- assignFunctionEXT(glFramebufferTexture2D);
- assignFunctionEXT(glFramebufferRenderbuffer);
- assignFunctionEXT(glDeleteFramebuffers);
- assignFunctionEXT(glDeleteRenderbuffers);
+ assignFunctionEXT(glGenRenderbuffers)
+ assignFunctionEXT(glBindRenderbuffer)
+ assignFunctionEXT(glRenderbufferStorage)
+ assignFunctionEXT(glGenFramebuffers)
+ assignFunctionEXT(glBindFramebuffer)
+ assignFunctionEXT(glFramebufferTexture2D)
+ assignFunctionEXT(glFramebufferRenderbuffer)
+ assignFunctionEXT(glDeleteFramebuffers)
+ assignFunctionEXT(glDeleteRenderbuffers)
}
else
{ // no frame buffer support
@@ -1173,18 +1175,18 @@ void GraphicsManager::initOpenGLFunctions()
if (is43 || supportExtension("GL_KHR_debug"))
{
logger->log1("found GL_KHR_debug");
- assignFunction(glDebugMessageControl);
- assignFunction(glDebugMessageCallback);
- assignFunction(glPushDebugGroup);
- assignFunction(glPopDebugGroup);
- assignFunction(glObjectLabel);
+ assignFunction(glDebugMessageControl)
+ assignFunction(glDebugMessageCallback)
+ assignFunction(glPushDebugGroup)
+ assignFunction(glPopDebugGroup)
+ assignFunction(glObjectLabel)
mSupportDebug = 2;
}
else if (supportExtension("GL_ARB_debug_output"))
{
logger->log1("found GL_ARB_debug_output");
- assignFunctionARB(glDebugMessageControl);
- assignFunctionARB(glDebugMessageCallback);
+ assignFunctionARB(glDebugMessageControl)
+ assignFunctionARB(glDebugMessageCallback)
mSupportDebug = 1;
}
else
@@ -1196,7 +1198,7 @@ void GraphicsManager::initOpenGLFunctions()
if (supportExtension("GL_GREMEDY_frame_terminator"))
{
logger->log1("found GL_GREMEDY_frame_terminator");
- assignFunction2(glFrameTerminator, "glFrameTerminatorGREMEDY");
+ assignFunction2(glFrameTerminator, "glFrameTerminatorGREMEDY")
}
else
{
@@ -1205,10 +1207,10 @@ void GraphicsManager::initOpenGLFunctions()
if (is44 || supportExtension("GL_EXT_debug_label"))
{
logger->log1("found GL_EXT_debug_label");
- assignFunction2(glLabelObject, "glObjectLabel");
+ assignFunction2(glLabelObject, "glObjectLabel")
if (isGLNull(mglLabelObject))
- assignFunctionEXT(glLabelObject);
- assignFunctionEXT(glGetObjectLabel);
+ assignFunctionEXT(glLabelObject)
+ assignFunctionEXT(glGetObjectLabel)
}
else
{
@@ -1217,7 +1219,7 @@ void GraphicsManager::initOpenGLFunctions()
if (supportExtension("GL_GREMEDY_string_marker"))
{
logger->log1("found GL_GREMEDY_string_marker");
- assignFunction2(glPushGroupMarker, "glStringMarkerGREMEDY");
+ assignFunction2(glPushGroupMarker, "glStringMarkerGREMEDY")
}
else
{
@@ -1226,9 +1228,9 @@ void GraphicsManager::initOpenGLFunctions()
if (supportExtension("GL_EXT_debug_marker"))
{
logger->log1("found GL_EXT_debug_marker");
- assignFunctionEXT(glInsertEventMarker);
- assignFunctionEXT(glPushGroupMarker);
- assignFunctionEXT(glPopGroupMarker);
+ assignFunctionEXT(glInsertEventMarker)
+ assignFunctionEXT(glPushGroupMarker)
+ assignFunctionEXT(glPopGroupMarker)
}
else
{
@@ -1237,12 +1239,12 @@ void GraphicsManager::initOpenGLFunctions()
if (is15 && (is30 || supportExtension("GL_EXT_timer_query")))
{
logger->log1("found GL_EXT_timer_query");
- assignFunction(glGenQueries);
- assignFunction(glBeginQuery);
- assignFunction(glEndQuery);
- assignFunction(glDeleteQueries);
- assignFunction(glGetQueryObjectiv);
- assignFunctionEXT(glGetQueryObjectui64v);
+ assignFunction(glGenQueries)
+ assignFunction(glBeginQuery)
+ assignFunction(glEndQuery)
+ assignFunction(glDeleteQueries)
+ assignFunction(glGetQueryObjectiv)
+ assignFunctionEXT(glGetQueryObjectui64v)
}
else
{
@@ -1251,7 +1253,7 @@ void GraphicsManager::initOpenGLFunctions()
if (is20 && (is43 || supportExtension("GL_ARB_invalidate_subdata")))
{
logger->log1("found GL_ARB_invalidate_subdata");
- assignFunction(glInvalidateTexImage);
+ assignFunction(glInvalidateTexImage)
}
else
{
@@ -1260,13 +1262,13 @@ void GraphicsManager::initOpenGLFunctions()
if (is21 && (is30 || supportExtension("GL_ARB_vertex_array_object")))
{
logger->log1("found GL_ARB_vertex_array_object");
- assignFunction(glGenVertexArrays);
- assignFunction(glBindVertexArray);
- assignFunction(glDeleteVertexArrays);
- assignFunction(glVertexAttribPointer);
- assignFunction(glEnableVertexAttribArray);
- assignFunction(glDisableVertexAttribArray);
- assignFunction(glVertexAttribIPointer);
+ assignFunction(glGenVertexArrays)
+ assignFunction(glBindVertexArray)
+ assignFunction(glDeleteVertexArrays)
+ assignFunction(glVertexAttribPointer)
+ assignFunction(glEnableVertexAttribArray)
+ assignFunction(glDisableVertexAttribArray)
+ assignFunction(glVertexAttribIPointer)
}
else
{
@@ -1275,11 +1277,11 @@ void GraphicsManager::initOpenGLFunctions()
}
if (is20 || supportExtension("GL_ARB_vertex_buffer_object"))
{
- assignFunction(glGenBuffers);
- assignFunction(glDeleteBuffers);
- assignFunction(glBindBuffer);
- assignFunction(glBufferData);
- assignFunction(glIsBuffer);
+ assignFunction(glGenBuffers)
+ assignFunction(glDeleteBuffers)
+ assignFunction(glBindBuffer)
+ assignFunction(glBufferData)
+ assignFunction(glIsBuffer)
}
else
{
@@ -1289,7 +1291,7 @@ void GraphicsManager::initOpenGLFunctions()
if (is43 || supportExtension("GL_ARB_copy_image"))
{
logger->log1("found GL_ARB_copy_image");
- assignFunction(glCopyImageSubData);
+ assignFunction(glCopyImageSubData)
}
else
{
@@ -1298,8 +1300,8 @@ void GraphicsManager::initOpenGLFunctions()
if (is44 || supportExtension("GL_ARB_clear_texture"))
{
logger->log1("found GL_ARB_clear_texture");
- assignFunction(glClearTexImage);
- assignFunction(glClearTexSubImage);
+ assignFunction(glClearTexImage)
+ assignFunction(glClearTexSubImage)
}
else
{
@@ -1308,35 +1310,35 @@ void GraphicsManager::initOpenGLFunctions()
if (is20 || supportExtension("GL_ARB_shader_objects"))
{
logger->log1("found GL_ARB_shader_objects");
- assignFunction(glCreateShader);
- assignFunction(glDeleteShader);
- assignFunction(glGetShaderiv);
- assignFunction(glGetShaderInfoLog);
- assignFunction(glGetShaderSource);
- assignFunction(glShaderSource);
- assignFunction(glCompileShader);
- assignFunction(glLinkProgram);
- assignFunction(glGetProgramInfoLog);
- assignFunction(glDeleteProgram);
- assignFunction(glCreateProgram);
- assignFunction(glAttachShader);
- assignFunction(glDetachShader);
- assignFunction(glGetAttachedShaders);
- assignFunction(glGetUniformLocation);
- assignFunction(glGetActiveUniform);
- assignFunction(glGetProgramiv);
- assignFunction(glUseProgram);
- assignFunction(glValidateProgram);
- assignFunction(glGetAttribLocation);
- assignFunction(glUniform1f);
- assignFunction(glUniform2f);
- assignFunction(glUniform3f);
- assignFunction(glUniform4f);
+ assignFunction(glCreateShader)
+ assignFunction(glDeleteShader)
+ assignFunction(glGetShaderiv)
+ assignFunction(glGetShaderInfoLog)
+ assignFunction(glGetShaderSource)
+ assignFunction(glShaderSource)
+ assignFunction(glCompileShader)
+ assignFunction(glLinkProgram)
+ assignFunction(glGetProgramInfoLog)
+ assignFunction(glDeleteProgram)
+ assignFunction(glCreateProgram)
+ assignFunction(glAttachShader)
+ assignFunction(glDetachShader)
+ assignFunction(glGetAttachedShaders)
+ assignFunction(glGetUniformLocation)
+ assignFunction(glGetActiveUniform)
+ assignFunction(glGetProgramiv)
+ assignFunction(glUseProgram)
+ assignFunction(glValidateProgram)
+ assignFunction(glGetAttribLocation)
+ assignFunction(glUniform1f)
+ assignFunction(glUniform2f)
+ assignFunction(glUniform3f)
+ assignFunction(glUniform4f)
if (is30 || supportExtension("GL_EXT_gpu_shader4"))
{
logger->log1("found GL_EXT_gpu_shader4");
- assignFunction(glBindFragDataLocation);
+ assignFunction(glBindFragDataLocation)
}
else
{
@@ -1346,10 +1348,10 @@ void GraphicsManager::initOpenGLFunctions()
if (is41 || supportExtension("GL_ARB_separate_shader_objects"))
{
logger->log1("found GL_ARB_separate_shader_objects");
- assignFunction(glProgramUniform1f);
- assignFunction(glProgramUniform2f);
- assignFunction(glProgramUniform3f);
- assignFunction(glProgramUniform4f);
+ assignFunction(glProgramUniform1f)
+ assignFunction(glProgramUniform2f)
+ assignFunction(glProgramUniform3f)
+ assignFunction(glProgramUniform4f)
}
else
{
@@ -1358,10 +1360,10 @@ void GraphicsManager::initOpenGLFunctions()
if (is43 || supportExtension("GL_ARB_vertex_attrib_binding"))
{
logger->log1("found GL_ARB_vertex_attrib_binding");
- assignFunction(glBindVertexBuffer);
- assignFunction(glVertexAttribBinding);
- assignFunction(glVertexAttribFormat);
- assignFunction(glVertexAttribIFormat);
+ assignFunction(glBindVertexBuffer)
+ assignFunction(glVertexAttribBinding)
+ assignFunction(glVertexAttribFormat)
+ assignFunction(glVertexAttribIFormat)
}
else
{
@@ -1371,7 +1373,7 @@ void GraphicsManager::initOpenGLFunctions()
if (is44 || supportExtension("GL_ARB_multi_bind"))
{
logger->log1("found GL_ARB_multi_bind");
- assignFunction(glBindVertexBuffers);
+ assignFunction(glBindVertexBuffers)
}
else
{
@@ -1385,7 +1387,7 @@ void GraphicsManager::initOpenGLFunctions()
}
#ifdef WIN32
- assignFunctionARB(wglGetExtensionsString);
+ assignFunctionARB(wglGetExtensionsString)
#endif // WIN32
#endif // __native_client__
}
@@ -1653,7 +1655,7 @@ void GraphicsManager::updateDebugLog() const
void GraphicsManager::detectPixelSize()
{
SDL_SysWMinfo info;
- SDL_VERSION(&info.version);
+ SDL_VERSION(&info.version)
if (SDL::getWindowWMInfo(mainGraphics->getWindow(), &info))
{
#ifdef WIN32
diff --git a/src/gui/fonts/font.cpp b/src/gui/fonts/font.cpp
index 9d09d7855..5ce6b88d0 100644
--- a/src/gui/fonts/font.cpp
+++ b/src/gui/fonts/font.cpp
@@ -124,7 +124,7 @@ Font::Font(std::string filename,
{
reportAlways("Error: requested load font %s with size %d",
filename.c_str(),
- size);
+ size)
size = 4;
}
@@ -151,7 +151,7 @@ Font::Font(std::string filename,
{
#ifdef UNITTESTS
reportAlways("Font load failed %s",
- filename.c_str());
+ filename.c_str())
#endif // UNITTESTS
logger->error("Font::Font: " +
std::string(SDL_GetError()));
@@ -205,7 +205,7 @@ TTF_Font *Font::openFont(const char *const name,
#ifndef UNITTESTS
// +++ in future need trigger assert in unit tests here too
reportAlways("Font::openFont font not exists: %s",
- path.c_str());
+ path.c_str())
#endif // UNITTESTS
return nullptr;
}
@@ -489,7 +489,7 @@ void Font::insertChunk(TextChunk *const chunk)
chunk->color, chunk->color2));
if (i != search.end())
{
- delete2(chunk->img);
+ delete2(chunk->img)
return;
}
diff --git a/src/gui/fonts/textchunk.cpp b/src/gui/fonts/textchunk.cpp
index 9280b9241..75b9c9626 100644
--- a/src/gui/fonts/textchunk.cpp
+++ b/src/gui/fonts/textchunk.cpp
@@ -81,7 +81,7 @@ TextChunk::TextChunk(const std::string &restrict text0,
TextChunk::~TextChunk()
{
- delete2(img);
+ delete2(img)
#ifdef UNITTESTS
textChunkCnt --;
#endif // UNITTESTS
@@ -198,6 +198,6 @@ void TextChunk::deleteImage()
}
else
{
- delete2(img);
+ delete2(img)
}
}
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index be516ebe9..4e9133188 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -267,7 +267,7 @@ void Gui::postInit(Graphics *const graphics)
Gui::~Gui()
{
config.removeListeners(mConfigListener);
- delete2(mConfigListener);
+ delete2(mConfigListener)
if (mMouseCursors != nullptr)
{
@@ -283,16 +283,16 @@ Gui::~Gui()
Window::setWindowContainer(nullptr);
delete top;
- delete2(mGuiFont);
- delete2(boldFont);
- delete2(mHelpFont);
- delete2(mSecureFont);
- delete2(mInfoParticleFont);
- delete2(mNpcFont);
- delete2(guiInput);
- delete2(theme);
+ delete2(mGuiFont)
+ delete2(boldFont)
+ delete2(mHelpFont)
+ delete2(mSecureFont)
+ delete2(mInfoParticleFont)
+ delete2(mNpcFont)
+ delete2(guiInput)
+ delete2(theme)
- delete2(mFocusHandler);
+ delete2(mFocusHandler)
Label::finalCleanup();
Tab::finalCleanup();
Widget::cleanGlobalFont();
diff --git a/src/gui/models/colormodel.cpp b/src/gui/models/colormodel.cpp
index 694fecff0..e30458750 100644
--- a/src/gui/models/colormodel.cpp
+++ b/src/gui/models/colormodel.cpp
@@ -66,7 +66,7 @@ void ColorModel::add(const std::string &name, const Color *const color1,
#define addColor(name, color) \
model->add(name, &widget->getThemeColor(ThemeColorId::color, 255U), \
- &widget->getThemeColor(ThemeColorId::color##_OUTLINE, 255U));
+ &widget->getThemeColor(ThemeColorId::color##_OUTLINE, 255U))
ColorModel *ColorModel::createDefault(const Widget2 *const widget)
{
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 1d4745110..c795a0384 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -1546,7 +1546,7 @@ void PopupMenu::handleLink(const std::string &link,
// Unknown actions
else if (link != "cancel")
{
- reportAlways("PopupMenu: Warning, unknown action '%s'", link.c_str());
+ reportAlways("PopupMenu: Warning, unknown action '%s'", link.c_str())
}
if (!mAllowCleanMenu)
diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp
index 863dd38ef..dd2b317ab 100644
--- a/src/gui/popups/statuspopup.cpp
+++ b/src/gui/popups/statuspopup.cpp
@@ -59,27 +59,27 @@ void StatusPopup::postInit()
Popup::postInit();
const int fontHeight = getFont()->getHeight();
int y = 0;
- addLabel(0);
- addLabel(1);
- addLabel(2);
- addLabel(3);
+ addLabel(0)
+ addLabel(1)
+ addLabel(2)
+ addLabel(3)
y += 4;
- addLabel(4);
- addLabel(5);
- addLabel(9);
- addLabel(10);
+ addLabel(4)
+ addLabel(5)
+ addLabel(9)
+ addLabel(10)
y += 4;
- addLabel(6);
- addLabel(7);
+ addLabel(6)
+ addLabel(7)
y += 4;
- addLabel(8);
+ addLabel(8)
y += 4;
- addLabel(12);
- addLabel(13);
- addLabel(14);
- addLabel(15);
+ addLabel(12)
+ addLabel(13)
+ addLabel(14)
+ addLabel(15)
y += 4;
- addLabel(11);
+ addLabel(11)
}
StatusPopup::~StatusPopup()
diff --git a/src/gui/skin.cpp b/src/gui/skin.cpp
index 65f7a1b41..2797ad0d1 100644
--- a/src/gui/skin.cpp
+++ b/src/gui/skin.cpp
@@ -96,8 +96,8 @@ Skin::~Skin()
mStickyImageDown = nullptr;
}
- delete2(mOptions);
- delete2(mBorder);
+ delete2(mOptions)
+ delete2(mBorder)
}
void Skin::updateAlpha(const float minimumOpacityAllowed)
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index c6d1e1bd1..4954e0d8c 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -891,7 +891,7 @@ void Theme::loadRect(ImageRect &image,
Theme::getThemePath());
if (skin != nullptr)
{
- loadGrid();
+ loadGrid()
unload(skin);
}
}
@@ -907,7 +907,7 @@ Skin *Theme::loadSkinRect(ImageRect &image,
true,
Theme::getThemePath());
if (skin != nullptr)
- loadGrid();
+ loadGrid()
return skin;
}
diff --git a/src/gui/widgets/attrs/attrdisplay.cpp b/src/gui/widgets/attrs/attrdisplay.cpp
index fe5c1f3e3..5ab26c02b 100644
--- a/src/gui/widgets/attrs/attrdisplay.cpp
+++ b/src/gui/widgets/attrs/attrdisplay.cpp
@@ -52,7 +52,7 @@ AttrDisplay::AttrDisplay(const Widget2 *const widget,
AttrDisplay::~AttrDisplay()
{
- delete2(mLayout);
+ delete2(mLayout)
}
std::string AttrDisplay::update()
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp
index 92611687d..95fe9e1ef 100644
--- a/src/gui/widgets/basiccontainer.cpp
+++ b/src/gui/widgets/basiccontainer.cpp
@@ -82,7 +82,7 @@ void BasicContainer::moveToTop(Widget *const widget) restrict2
{
if (widget == nullptr)
{
- reportAlways("BasicContainer::moveToTop empty widget.");
+ reportAlways("BasicContainer::moveToTop empty widget.")
return;
}
@@ -110,7 +110,7 @@ void BasicContainer::moveToBottom(Widget *const widget) restrict2
{
if (widget == nullptr)
{
- reportAlways("BasicContainer::moveToBottom empty widget.");
+ reportAlways("BasicContainer::moveToBottom empty widget.")
return;
}
const WidgetListIterator iter = std::find(mWidgets.begin(),
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 7354dbabf..82039de0c 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -413,7 +413,7 @@ void BrowserBox::draw(Graphics *const graphics)
setHeight(mHeight);
mUpdateTime = cur_time;
if (mDimension.width != mWidth)
- reportAlways("browserbox resize in draw");
+ reportAlways("browserbox resize in draw")
}
if (mOpaque == Opaque_true)
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 34112e5a5..840171207 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -346,7 +346,7 @@ Button::~Button()
for (int mode = 0; mode < BUTTON_COUNT; mode ++)
theme->unload(mSkin[mode]);
}
- delete2(mVertexes2);
+ delete2(mVertexes2)
if (mImageSet != nullptr)
{
mImageSet->decRef();
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index d10acc705..ffd04302d 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -60,7 +60,7 @@ EmotePage::~EmotePage()
mEmotes->decRef();
mEmotes = nullptr;
}
- delete2(mVertexes);
+ delete2(mVertexes)
}
void EmotePage::draw(Graphics *const graphics)
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 7dc8c288a..2db154dc9 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -73,7 +73,7 @@ GuiTable::~GuiTable()
gui->removeDragged(this);
uninstallActionListeners();
- delete2(mModel);
+ delete2(mModel)
}
const TableModel *GuiTable::getModel() const
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 69c816a68..fba09fddb 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -297,7 +297,7 @@ ItemContainer::~ItemContainer()
theme->unload(mSkin);
delete []mShowMatrix;
- delete2(mVertexes);
+ delete2(mVertexes)
}
void ItemContainer::logic()
@@ -745,7 +745,7 @@ void ItemContainer::mouseReleased(MouseEvent &event)
case SEL_SELECTED:
default:
break;
- };
+ }
if (dragDrop.isEmpty())
{
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index c676de26e..05487b7be 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -84,7 +84,7 @@ Popup::~Popup()
{
logger->log("Popup::~Popup(\"%s\")", mPopupName.c_str());
- delete2(mVertexes);
+ delete2(mVertexes)
if (mSkin != nullptr)
{
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 46988133b..05933fe89 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -120,7 +120,7 @@ ProgressBar::~ProgressBar()
mSkin = nullptr;
}
Theme::unloadRect(mFillRect, 0, 8);
- delete2(mVertexes);
+ delete2(mVertexes)
mTextChunk.deleteImage();
}
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp
index f87c3cb09..30e7da5e8 100644
--- a/src/gui/widgets/progressindicator.cpp
+++ b/src/gui/widgets/progressindicator.cpp
@@ -60,7 +60,7 @@ ProgressIndicator::~ProgressIndicator()
if (gui != nullptr)
gui->removeDragged(this);
- delete2(mIndicator);
+ delete2(mIndicator)
}
void ProgressIndicator::logic()
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index cce45deee..f313ee400 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -172,8 +172,8 @@ ScrollArea::~ScrollArea()
}
}
- delete2(mVertexes);
- delete2(mVertexes2);
+ delete2(mVertexes)
+ delete2(mVertexes2)
setContent(nullptr);
}
diff --git a/src/gui/widgets/selldialog.cpp b/src/gui/widgets/selldialog.cpp
index dc612c0ac..b1bddd32b 100644
--- a/src/gui/widgets/selldialog.cpp
+++ b/src/gui/widgets/selldialog.cpp
@@ -221,7 +221,7 @@ void SellDialog::postInit()
SellDialog::~SellDialog()
{
- delete2(mShopItems);
+ delete2(mShopItems)
instances.remove(this);
}
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index 5eb4ea46f..14a774bb7 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -91,7 +91,7 @@ ShortcutContainer::~ShortcutContainer()
if (gui != nullptr)
gui->removeDragged(this);
- delete2(mVertexes);
+ delete2(mVertexes)
}
void ShortcutContainer::widgetResized(const Event &event A_UNUSED)
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 2c4c6c212..4caaa6a45 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -135,7 +135,7 @@ Slider::~Slider()
if (gui != nullptr)
gui->removeDragged(this);
- delete2(mVertexes);
+ delete2(mVertexes)
mInstances--;
if (mInstances == 0)
{
diff --git a/src/gui/widgets/staticbrowserbox.cpp b/src/gui/widgets/staticbrowserbox.cpp
index c4a705aa9..13d3bfb64 100644
--- a/src/gui/widgets/staticbrowserbox.cpp
+++ b/src/gui/widgets/staticbrowserbox.cpp
@@ -362,7 +362,7 @@ void StaticBrowserBox::draw(Graphics *const graphics)
updateHeight();
reportAlways("browserbox resize in draw: %d, %d",
mDimension.width,
- mWidth);
+ mWidth)
}
if (mOpaque == Opaque_true)
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 59882966c..693a53e10 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -136,14 +136,14 @@ TabbedArea::~TabbedArea()
remove(mTabContainer);
remove(mWidgetContainer);
- delete2(mTabContainer);
- delete2(mWidgetContainer);
+ delete2(mTabContainer)
+ delete2(mWidgetContainer)
for (size_t i = 0, sz = mTabsToDelete.size(); i < sz; i++)
delete2(mTabsToDelete[i])
- delete2(mArrowButton[0]);
- delete2(mArrowButton[1]);
+ delete2(mArrowButton[0])
+ delete2(mArrowButton[1])
}
void TabbedArea::enableScrollButtons(const bool enable)
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index 8d3ccafbb..67761a21c 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -103,8 +103,8 @@ ChatTab::~ChatTab()
if (chatWindow != nullptr)
chatWindow->removeTab(this);
- delete2(mTextOutput);
- delete2(mScrollArea);
+ delete2(mTextOutput)
+ delete2(mScrollArea)
}
void ChatTab::chatLog(std::string line,
diff --git a/src/gui/widgets/tabs/mapdebugtab.cpp b/src/gui/widgets/tabs/mapdebugtab.cpp
index 6b133e4bb..36a96084d 100644
--- a/src/gui/widgets/tabs/mapdebugtab.cpp
+++ b/src/gui/widgets/tabs/mapdebugtab.cpp
@@ -125,7 +125,7 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
// TRANSLATORS: debug window label
mFPSText = _("%d FPS (SDL2 default)");
break;
- };
+ }
#else // USE_OPENGL
// TRANSLATORS: debug window label
diff --git a/src/gui/widgets/tabs/setup_audio.cpp b/src/gui/widgets/tabs/setup_audio.cpp
index 2a9d63eba..e9617a178 100644
--- a/src/gui/widgets/tabs/setup_audio.cpp
+++ b/src/gui/widgets/tabs/setup_audio.cpp
@@ -205,8 +205,8 @@ Setup_Audio::Setup_Audio(const Widget2 *const widget) :
Setup_Audio::~Setup_Audio()
{
- delete2(mSoundModel);
- delete2(mChannelsList);
+ delete2(mSoundModel)
+ delete2(mChannelsList)
}
void Setup_Audio::apply()
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 49b31c5fe..835e6075d 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -138,14 +138,14 @@ Setup_Input::Setup_Input(const Widget2 *const widget) :
Setup_Input::~Setup_Input()
{
- delete2(mKeyList);
- delete2(mKeyListModel);
- delete2(mAssignKeyButton);
- delete2(mUnassignKeyButton);
- delete2(mResetKeysButton);
+ delete2(mKeyList)
+ delete2(mKeyListModel)
+ delete2(mAssignKeyButton)
+ delete2(mUnassignKeyButton)
+ delete2(mResetKeysButton)
delete [] mActionDataSize;
mActionDataSize = nullptr;
- delete2(mScrollArea);
+ delete2(mScrollArea)
}
void Setup_Input::apply()
diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp
index e3dd95caf..b2bf2c3a7 100644
--- a/src/gui/widgets/tabs/setup_joystick.cpp
+++ b/src/gui/widgets/tabs/setup_joystick.cpp
@@ -105,7 +105,7 @@ Setup_Joystick::Setup_Joystick(const Widget2 *const widget) :
Setup_Joystick::~Setup_Joystick()
{
- delete2(mNamesModel);
+ delete2(mNamesModel)
}
void Setup_Joystick::action(const ActionEvent &event)
diff --git a/src/gui/widgets/tabs/setup_misc.cpp b/src/gui/widgets/tabs/setup_misc.cpp
index 408184311..713ad7db9 100644
--- a/src/gui/widgets/tabs/setup_misc.cpp
+++ b/src/gui/widgets/tabs/setup_misc.cpp
@@ -572,11 +572,11 @@ Setup_Misc::Setup_Misc(const Widget2 *const widget) :
Setup_Misc::~Setup_Misc()
{
- delete2(mProxyTypeList);
- delete2(mShortcutsList);
- delete2(mDensityList);
+ delete2(mProxyTypeList)
+ delete2(mShortcutsList)
+ delete2(mDensityList)
#ifdef USE_SDL2
- delete2(mSdlLogList);
+ delete2(mSdlLogList)
#endif // USE_SDL2
}
diff --git a/src/gui/widgets/tabs/setup_perfomance.cpp b/src/gui/widgets/tabs/setup_perfomance.cpp
index 03a4fba45..83dc41503 100644
--- a/src/gui/widgets/tabs/setup_perfomance.cpp
+++ b/src/gui/widgets/tabs/setup_perfomance.cpp
@@ -229,8 +229,8 @@ Setup_Perfomance::Setup_Perfomance(const Widget2 *const widget) :
Setup_Perfomance::~Setup_Perfomance()
{
- delete2(mTexturesList);
+ delete2(mTexturesList)
#ifdef USE_SDL2
- delete2(mSdlDriversList);
+ delete2(mSdlDriversList)
#endif // USE_SDL2
}
diff --git a/src/gui/widgets/tabs/setup_players.cpp b/src/gui/widgets/tabs/setup_players.cpp
index 67fe2d459..940c4d9c6 100644
--- a/src/gui/widgets/tabs/setup_players.cpp
+++ b/src/gui/widgets/tabs/setup_players.cpp
@@ -215,9 +215,9 @@ Setup_Players::Setup_Players(const Widget2 *const widget) :
Setup_Players::~Setup_Players()
{
- delete2(mBadgesList);
- delete2(mVisibleNamesList);
- delete2(mVisibleNamesPosList);
+ delete2(mBadgesList)
+ delete2(mVisibleNamesList)
+ delete2(mVisibleNamesPosList)
}
void Setup_Players::externalUpdated()
diff --git a/src/gui/widgets/tabs/setup_quick.cpp b/src/gui/widgets/tabs/setup_quick.cpp
index f50c1d6a8..18e61d0c0 100644
--- a/src/gui/widgets/tabs/setup_quick.cpp
+++ b/src/gui/widgets/tabs/setup_quick.cpp
@@ -113,6 +113,6 @@ Setup_Quick::Setup_Quick(const Widget2 *const widget) :
Setup_Quick::~Setup_Quick()
{
- delete2(mMoveTypeList);
- delete2(mCrazyMoveTypeList);
+ delete2(mMoveTypeList)
+ delete2(mCrazyMoveTypeList)
}
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index e89c2a3e0..03ee760c9 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -149,7 +149,7 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) :
Setup_Relations::~Setup_Relations()
{
playerRelations.removeListener(this);
- delete2(mIgnoreActionChoicesModel);
+ delete2(mIgnoreActionChoicesModel)
}
diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp
index 080573c3c..22db49b34 100644
--- a/src/gui/widgets/tabs/setup_theme.cpp
+++ b/src/gui/widgets/tabs/setup_theme.cpp
@@ -236,13 +236,13 @@ Setup_Theme::Setup_Theme(const Widget2 *const widget) :
Setup_Theme::~Setup_Theme()
{
- delete2(mInfo);
- delete2(mThemesModel);
- delete2(mFontsModel);
- delete2(mFontSizeListModel);
- delete2(mNpcFontSizeListModel);
- delete2(mLangListModel);
- delete2(mInfo);
+ delete2(mInfo)
+ delete2(mThemesModel)
+ delete2(mFontsModel)
+ delete2(mFontSizeListModel)
+ delete2(mNpcFontSizeListModel)
+ delete2(mLangListModel)
+ delete2(mInfo)
}
void Setup_Theme::updateInfo()
@@ -347,7 +347,7 @@ void Setup_Theme::cancel()
}
#define updateField(name1, name2) if (!mInfo->name1.empty()) \
- name2 = mInfo->name1;
+ name2 = mInfo->name1
void Setup_Theme::apply()
{
diff --git a/src/gui/widgets/tabs/setup_touch.cpp b/src/gui/widgets/tabs/setup_touch.cpp
index f8247d15d..1b6ce3ed4 100644
--- a/src/gui/widgets/tabs/setup_touch.cpp
+++ b/src/gui/widgets/tabs/setup_touch.cpp
@@ -137,7 +137,7 @@ Setup_Touch::Setup_Touch(const Widget2 *const widget) :
Setup_Touch::~Setup_Touch()
{
- delete2(mSizeList);
- delete2(mFormatList);
- delete2(mActionsList);
+ delete2(mSizeList)
+ delete2(mFormatList)
+ delete2(mActionsList)
}
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 557cdffce..0adc55ec6 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -217,10 +217,10 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
Setup_Video::~Setup_Video()
{
- delete2(mModeListModel);
- delete2(mModeList);
- delete2(mOpenGLListModel);
- delete2(mDialog);
+ delete2(mModeListModel)
+ delete2(mModeList)
+ delete2(mOpenGLListModel)
+ delete2(mDialog)
}
void Setup_Video::apply()
diff --git a/src/gui/widgets/tabs/setup_visual.cpp b/src/gui/widgets/tabs/setup_visual.cpp
index 6912ef560..325732467 100644
--- a/src/gui/widgets/tabs/setup_visual.cpp
+++ b/src/gui/widgets/tabs/setup_visual.cpp
@@ -256,12 +256,12 @@ Setup_Visual::Setup_Visual(const Widget2 *const widget) :
Setup_Visual::~Setup_Visual()
{
- delete2(mSpeachList);
- delete2(mAmbientFxList);
- delete2(mParticleList);
- delete2(mParticleTypeList);
- delete2(mVSyncList);
- delete2(mScaleList);
+ delete2(mSpeachList)
+ delete2(mAmbientFxList)
+ delete2(mParticleList)
+ delete2(mParticleTypeList)
+ delete2(mVSyncList)
+ delete2(mScaleList)
}
void Setup_Visual::apply()
diff --git a/src/gui/widgets/tabs/setuptabscroll.cpp b/src/gui/widgets/tabs/setuptabscroll.cpp
index 1b2096c1f..1f9cceaba 100644
--- a/src/gui/widgets/tabs/setuptabscroll.cpp
+++ b/src/gui/widgets/tabs/setuptabscroll.cpp
@@ -45,7 +45,7 @@ SetupTabScroll::SetupTabScroll(const Widget2 *const widget) :
SetupTabScroll::~SetupTabScroll()
{
mScroll = nullptr;
- delete2(mContainer);
+ delete2(mContainer)
removeItems();
}
diff --git a/src/gui/widgets/tabs/socialattacktab.h b/src/gui/widgets/tabs/socialattacktab.h
index 0b2e8db41..752a32942 100644
--- a/src/gui/widgets/tabs/socialattacktab.h
+++ b/src/gui/widgets/tabs/socialattacktab.h
@@ -63,11 +63,11 @@ class SocialAttackTab final : public SocialTab
{
updateAtkListStart();
// TRANSLATORS: mobs group name in social window
- addAvatars(PriorityAttackMob, _("Priority mobs"), PRIORITY);
+ addAvatars(PriorityAttackMob, _("Priority mobs"), PRIORITY)
// TRANSLATORS: mobs group name in social window
- addAvatars(AttackMob, _("Attack mobs"), ATTACK);
+ addAvatars(AttackMob, _("Attack mobs"), ATTACK)
// TRANSLATORS: mobs group name in social window
- addAvatars(IgnoreAttackMob, _("Ignore mobs"), IGNORE_);
+ addAvatars(IgnoreAttackMob, _("Ignore mobs"), IGNORE_)
}
private:
diff --git a/src/gui/widgets/tabs/socialpickuptab.h b/src/gui/widgets/tabs/socialpickuptab.h
index 54d860664..00dc616f1 100644
--- a/src/gui/widgets/tabs/socialpickuptab.h
+++ b/src/gui/widgets/tabs/socialpickuptab.h
@@ -63,9 +63,9 @@ class SocialPickupTab final : public SocialTab
{
updateAtkListStart();
// TRANSLATORS: items group name in social window
- addAvatars(PickupItem, _("Pickup items"), PICKUP);
+ addAvatars(PickupItem, _("Pickup items"), PICKUP)
// TRANSLATORS: items group name in social window
- addAvatars(IgnorePickupItem, _("Ignore items"), NOPICKUP);
+ addAvatars(IgnorePickupItem, _("Ignore items"), NOPICKUP)
}
private:
diff --git a/src/gui/widgets/tabs/socialtabbase.h b/src/gui/widgets/tabs/socialtabbase.h
index b7cbf5a8f..8c0a7081e 100644
--- a/src/gui/widgets/tabs/socialtabbase.h
+++ b/src/gui/widgets/tabs/socialtabbase.h
@@ -79,6 +79,6 @@ ENUMS_RESOURCES_MAP_MAPITEMTYPE_H
Avatar *ava = nullptr;\
std::list<std::string> mobs;\
std::list<std::string>::const_iterator i;\
- std::list<std::string>::const_iterator i_end;
+ std::list<std::string>::const_iterator i_end
#endif // GUI_WIDGETS_TABS_SOCIALTABBASE_H
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index fd4faafa1..e43833fe8 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -140,14 +140,14 @@ Tab::~Tab()
theme->unload(tabImg[mode]);
}
- delete2(mLabel);
+ delete2(mLabel)
if (mImage != nullptr)
{
mImage->decRef();
mImage = nullptr;
}
- delete2(mVertexes);
+ delete2(mVertexes)
}
void Tab::init()
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index f76c5fb9e..be0712315 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -179,7 +179,7 @@ Window::Window(const std::string &caption,
if (skin.empty())
{
reportAlways("Default skin was used for window: %s",
- caption.c_str());
+ caption.c_str())
skin = "window.xml";
}
@@ -251,7 +251,7 @@ void Window::postInit()
{
reportAlways("error: Window created with calling postInit() "
"more than once: %s",
- mWindowName.c_str());
+ mWindowName.c_str())
}
mInit = true;
}
@@ -272,7 +272,7 @@ Window::~Window()
saveWindowState();
- delete2(mLayout);
+ delete2(mLayout)
while (!mWidgets.empty())
delete mWidgets.front();
@@ -280,7 +280,7 @@ Window::~Window()
mWidgets.clear();
removeWidgetListener(this);
- delete2(mVertexes);
+ delete2(mVertexes)
windowInstances--;
@@ -298,7 +298,7 @@ Window::~Window()
if (!mInit)
{
reportAlways("error: Window created without calling postInit(): %s",
- mWindowName.c_str());
+ mWindowName.c_str())
}
}
@@ -1398,7 +1398,7 @@ void Window::reflowLayout(int w, int h)
return;
mLayout->reflow(w, h);
- delete2(mLayout);
+ delete2(mLayout)
setContentSize(w, h);
}
diff --git a/src/gui/widgets/windowcontainer.cpp b/src/gui/widgets/windowcontainer.cpp
index a275b7cb1..cb76223e3 100644
--- a/src/gui/widgets/windowcontainer.cpp
+++ b/src/gui/widgets/windowcontainer.cpp
@@ -59,7 +59,7 @@ void WindowContainer::scheduleDelete(Widget *const widget)
else
{
reportAlways("double adding pointer %p for deletion in scheduleDelete",
- static_cast<void*>(widget));
+ static_cast<void*>(widget))
}
}
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp
index d4923c478..b2adafff8 100644
--- a/src/gui/windowmanager.cpp
+++ b/src/gui/windowmanager.cpp
@@ -132,7 +132,7 @@ void WindowManager::createWindows()
CREATEWIDGETV0(itemPopup, ItemPopup);
CREATEWIDGETV0(spellPopup, SpellPopup);
CREATEWIDGETV0(skillPopup, SkillPopup);
- delete2(debugChatTab);
+ delete2(debugChatTab)
if (chatWindow != nullptr)
{
chatWindow->scheduleDelete();
@@ -171,34 +171,34 @@ void WindowManager::createValidateWindows()
void WindowManager::deleteValidateWindows()
{
#ifndef DYECMD
- delete2(skillDialog);
- delete2(beingEquipmentWindow);
- delete2(questsWindow);
+ delete2(skillDialog)
+ delete2(beingEquipmentWindow)
+ delete2(questsWindow)
#endif // DYECMD
}
void WindowManager::deleteWindows()
{
#ifndef DYECMD
- delete2(textBoxPopup);
- delete2(beingPopup);
- delete2(itemPopup);
- delete2(spellPopup);
- delete2(skillPopup);
- delete2(popupMenu);
- delete2(didYouKnowWindow);
- delete2(helpWindow);
- delete2(setupWindow);
- delete2(userPalette);
+ delete2(textBoxPopup)
+ delete2(beingPopup)
+ delete2(itemPopup)
+ delete2(spellPopup)
+ delete2(skillPopup)
+ delete2(popupMenu)
+ delete2(didYouKnowWindow)
+ delete2(helpWindow)
+ delete2(setupWindow)
+ delete2(userPalette)
delete2(spellManager)
delete2(spellShortcut)
- delete2(debugChatTab);
- delete2(chatWindow);
- delete2(debugWindow);
+ delete2(debugChatTab)
+ delete2(chatWindow)
+ delete2(debugWindow)
#endif // DYECMD
- delete2(textPopup);
+ delete2(textPopup)
}
void WindowManager::initTitle()
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index cc4cf4699..0dbcac79c 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -426,8 +426,8 @@ void BuyDialog::init()
BuyDialog::~BuyDialog()
{
- delete2(mShopItems);
- delete2(mSortModel);
+ delete2(mShopItems)
+ delete2(mSortModel)
instances.remove(this);
if (buySellHandler != nullptr)
buySellHandler->cleanDialogReference(this);
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp
index 5cd03a887..034ac2463 100644
--- a/src/gui/windows/changeemaildialog.cpp
+++ b/src/gui/windows/changeemaildialog.cpp
@@ -108,7 +108,7 @@ ChangeEmailDialog::ChangeEmailDialog(LoginData &data) :
ChangeEmailDialog::~ChangeEmailDialog()
{
- delete2(mWrongDataNoticeListener);
+ delete2(mWrongDataNoticeListener)
}
void ChangeEmailDialog::action(const ActionEvent &event)
diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp
index d302244ba..c0ba5e573 100644
--- a/src/gui/windows/changepassworddialog.cpp
+++ b/src/gui/windows/changepassworddialog.cpp
@@ -85,7 +85,7 @@ ChangePasswordDialog::ChangePasswordDialog(LoginData &data) :
ChangePasswordDialog::~ChangePasswordDialog()
{
- delete2(mWrongDataNoticeListener);
+ delete2(mWrongDataNoticeListener)
}
void ChangePasswordDialog::action(const ActionEvent &event)
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 852dbc2cc..5081ed63b 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -460,7 +460,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
CharCreateDialog::~CharCreateDialog()
{
- delete2(mPlayer);
+ delete2(mPlayer)
if (charServerHandler != nullptr)
charServerHandler->setCharCreateDialog(nullptr);
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 560826d79..d981c49b9 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -219,9 +219,9 @@ ChatWindow::~ChatWindow()
config.setValue("ReturnToggles", mReturnToggles);
removeAllWhispers();
removeAllChannels();
- delete2(mItemLinkHandler);
- delete2(mColorPicker);
- delete2(mColorListModel);
+ delete2(mItemLinkHandler)
+ delete2(mColorPicker)
+ delete2(mColorListModel)
}
void ChatWindow::postInit()
@@ -1060,7 +1060,7 @@ void ChatWindow::attributeChanged(const AttributesT id,
}
default:
break;
- };
+ }
PRAGMA45(GCC diagnostic pop)
}
diff --git a/src/gui/windows/clanwindow.cpp b/src/gui/windows/clanwindow.cpp
index d2fb1bfd6..7520fdf7f 100644
--- a/src/gui/windows/clanwindow.cpp
+++ b/src/gui/windows/clanwindow.cpp
@@ -83,10 +83,10 @@ ClanWindow::ClanWindow() :
ClanWindow::~ClanWindow()
{
- delete2(mInfoWidget);
- delete2(mStatsWidget);
- delete2(mAllyWidget);
- delete2(mAntagonistWidget);
+ delete2(mInfoWidget)
+ delete2(mStatsWidget)
+ delete2(mAllyWidget)
+ delete2(mAntagonistWidget)
}
void ClanWindow::postInit()
diff --git a/src/gui/windows/cutinwindow.cpp b/src/gui/windows/cutinwindow.cpp
index 12a54a3b9..9b665b49e 100644
--- a/src/gui/windows/cutinwindow.cpp
+++ b/src/gui/windows/cutinwindow.cpp
@@ -52,7 +52,7 @@ CutInWindow::CutInWindow() :
CutInWindow::~CutInWindow()
{
- delete2(mImage);
+ delete2(mImage)
}
void CutInWindow::draw(Graphics *const graphics)
@@ -76,7 +76,7 @@ void CutInWindow::draw2(Graphics *const graphics)
void CutInWindow::show(const std::string &name,
const CutInT cutin)
{
- delete2(mImage);
+ delete2(mImage)
if (name.empty())
{
setVisible(Visible_false);
@@ -138,7 +138,7 @@ void CutInWindow::show(const std::string &name,
void CutInWindow::hide()
{
- delete2(mImage);
+ delete2(mImage)
setVisible(Visible_false);
}
diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp
index 35d114ede..39cccba98 100644
--- a/src/gui/windows/debugwindow.cpp
+++ b/src/gui/windows/debugwindow.cpp
@@ -87,10 +87,10 @@ DebugWindow::DebugWindow(const std::string &name) :
DebugWindow::~DebugWindow()
{
- delete2(mMapWidget);
- delete2(mTargetWidget);
- delete2(mNetWidget);
- delete2(mStatWidget);
+ delete2(mMapWidget)
+ delete2(mTargetWidget)
+ delete2(mNetWidget)
+ delete2(mStatWidget)
}
void DebugWindow::postInit()
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 1d53a9a9f..6f44b7c92 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -116,7 +116,7 @@ void DidYouKnowWindow::postInit()
DidYouKnowWindow::~DidYouKnowWindow()
{
- delete2(mItemLinkHandler);
+ delete2(mItemLinkHandler)
}
void DidYouKnowWindow::action(const ActionEvent &event)
diff --git a/src/gui/windows/emotewindow.cpp b/src/gui/windows/emotewindow.cpp
index 537297203..17610da3c 100644
--- a/src/gui/windows/emotewindow.cpp
+++ b/src/gui/windows/emotewindow.cpp
@@ -146,16 +146,16 @@ EmoteWindow::~EmoteWindow()
{
mTabs->removeAll(false);
mTabs->removeTab(mTabs->getTabByIndex(0));
- delete2(mEmotePage);
- delete2(mColorPage);
- delete2(mColorModel);
- delete2(mScrollColorPage);
- delete2(mFontPage);
- delete2(mFontModel);
- delete2(mScrollFontPage);
- delete2(mTextPage);
- delete2(mTextModel);
- delete2(mScrollTextPage);
+ delete2(mEmotePage)
+ delete2(mColorPage)
+ delete2(mColorModel)
+ delete2(mScrollColorPage)
+ delete2(mFontPage)
+ delete2(mFontModel)
+ delete2(mScrollFontPage)
+ delete2(mTextPage)
+ delete2(mTextModel)
+ delete2(mScrollTextPage)
if (mImageSet != nullptr)
{
mImageSet->decRef();
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 7d0284fc1..9a351e4da 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -175,7 +175,7 @@ EquipmentWindow::~EquipmentWindow()
mSlotBackground->decRef();
if (mSlotHighlightedBackground != nullptr)
mSlotHighlightedBackground->decRef();
- delete2(mVertexes);
+ delete2(mVertexes)
}
void EquipmentWindow::draw(Graphics *const graphics)
@@ -751,7 +751,7 @@ void EquipmentWindow::prepareSlotNames()
const std::string name = XML::getProperty(slotNode, "name", "");
if (name.empty())
{
- reportAlways("Empty slot name detected.");
+ reportAlways("Empty slot name detected.")
continue;
}
@@ -760,7 +760,7 @@ void EquipmentWindow::prepareSlotNames()
{
reportAlways("Wrong slot id '%d' for slot with name '%s'",
slot,
- name.c_str());
+ name.c_str())
continue;
}
mSlotNames[name] = slot;
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index be036a558..aa4d90258 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -146,7 +146,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mSortDropDown->setSelected(config.getIntValue(
"cartSortOrder"));
break;
- };
+ }
}
else
{
@@ -374,7 +374,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
case InventoryType::Craft:
case InventoryType::TypeEnd:
break;
- };
+ }
Layout &layout = getLayout();
layout.setRowHeight(2, LayoutType::SET);
@@ -420,7 +420,7 @@ InventoryWindow::~InventoryWindow()
invInstances.front()->updateDropButton();
mSortDropDown->hideDrop(false);
- delete2(mSortModel);
+ delete2(mSortModel)
}
void InventoryWindow::storeSortOrder() const
@@ -449,7 +449,7 @@ void InventoryWindow::storeSortOrder() const
config.setValue("cartSortOrder",
mSortDropDown->getSelected());
break;
- };
+ }
}
}
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index c30a91780..60b8ea6e4 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -351,7 +351,7 @@ void ItemAmountWindow::postInit()
ItemAmountWindow::~ItemAmountWindow()
{
- delete2(mItemsModal);
+ delete2(mItemsModal)
}
// Show ItemTooltip
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 53a50d4d5..855ebbde9 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -224,8 +224,8 @@ LoginDialog::~LoginDialog()
if (mUpdateHostDropDown != nullptr)
mUpdateHostDropDown->hideDrop(false);
- delete2(mUpdateTypeModel);
- delete2(mUpdateListModel);
+ delete2(mUpdateTypeModel)
+ delete2(mUpdateListModel)
}
void LoginDialog::action(const ActionEvent &event)
diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp
index c241d97f8..473e78ef4 100644
--- a/src/gui/windows/maileditwindow.cpp
+++ b/src/gui/windows/maileditwindow.cpp
@@ -133,7 +133,7 @@ MailEditWindow::MailEditWindow() :
MailEditWindow::~MailEditWindow()
{
mailEditWindow = nullptr;
- delete2(mInventory);
+ delete2(mInventory)
}
void MailEditWindow::action(const ActionEvent &event)
diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp
index ea0aa9a91..61ed8faa2 100644
--- a/src/gui/windows/mailviewwindow.cpp
+++ b/src/gui/windows/mailviewwindow.cpp
@@ -152,10 +152,10 @@ MailViewWindow::~MailViewWindow()
}
else
{
- delete2(mMessage);
- delete2(mGetMoneyButton);
+ delete2(mMessage)
+ delete2(mGetMoneyButton)
}
- delete2(mInventory);
+ delete2(mInventory)
mailViewWindow = nullptr;
}
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index 6240792b4..c0f55c1b1 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -118,9 +118,9 @@ MailWindow::MailWindow() :
MailWindow::~MailWindow()
{
delete_all(mMessages);
- delete2(mMailModel);
- delete2(mailViewWindow);
- delete2(mailEditWindow);
+ delete2(mMailModel)
+ delete2(mailViewWindow)
+ delete2(mailEditWindow)
}
void MailWindow::action(const ActionEvent &event)
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 69dbcbf45..82facde3d 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -162,7 +162,7 @@ MiniStatusWindow::MiniStatusWindow() :
MiniStatusWindow::~MiniStatusWindow()
{
- delete2(mStatusPopup);
+ delete2(mStatusPopup)
delete_all(mIcons);
mIcons.clear();
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 7a671c987..49f0f3919 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -256,25 +256,25 @@ NpcDialog::~NpcDialog()
deleteSkinControls();
- delete2(mTextBox);
- delete2(mClearButton);
- delete2(mButton);
- delete2(mButton2);
- delete2(mButton3);
- delete2(mScrollArea);
- delete2(mItemList);
- delete2(mTextField);
- delete2(mIntField);
- delete2(mResetButton);
- delete2(mPlusButton);
- delete2(mMinusButton);
- delete2(mItemLinkHandler);
- delete2(mItemContainer);
- delete2(mInventory);
- delete2(mComplexInventory);
- delete2(mItemScrollArea);
- delete2(mListScrollArea);
- delete2(mSkinScrollArea);
+ delete2(mTextBox)
+ delete2(mClearButton)
+ delete2(mButton)
+ delete2(mButton2)
+ delete2(mButton3)
+ delete2(mScrollArea)
+ delete2(mItemList)
+ delete2(mTextField)
+ delete2(mIntField)
+ delete2(mResetButton)
+ delete2(mPlusButton)
+ delete2(mMinusButton)
+ delete2(mItemLinkHandler)
+ delete2(mItemContainer)
+ delete2(mInventory)
+ delete2(mComplexInventory)
+ delete2(mItemScrollArea)
+ delete2(mListScrollArea)
+ delete2(mSkinScrollArea)
FOR_EACH (ImageVectorIter, it, mImages)
{
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 69243ab1d..9948cf03f 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -137,11 +137,11 @@ QuestsWindow::QuestsWindow() :
QuestsWindow::~QuestsWindow()
{
- delete2(mQuestsModel);
+ delete2(mQuestsModel)
QuestDb::unload();
- delete2(mItemLinkHandler);
+ delete2(mItemLinkHandler)
mQuestLinks.clear();
mQuestReverseLinks.clear();
if (mCompleteIcon != nullptr)
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index 3484f9a48..2bddaa84b 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -133,10 +133,10 @@ QuitDialog::~QuitDialog()
{
if (mMyPointer != nullptr)
*mMyPointer = nullptr;
- delete2(mForceQuit);
- delete2(mLogoutQuit);
- delete2(mSwitchAccountServer);
- delete2(mSwitchCharacter);
+ delete2(mForceQuit)
+ delete2(mLogoutQuit)
+ delete2(mSwitchAccountServer)
+ delete2(mSwitchCharacter)
}
void QuitDialog::placeOption(ContainerPlacer &placer,
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 695fd58e2..5fb970f49 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -153,7 +153,7 @@ void RegisterDialog::postInit()
RegisterDialog::~RegisterDialog()
{
- delete2(mWrongDataNoticeListener);
+ delete2(mWrongDataNoticeListener)
}
void RegisterDialog::action(const ActionEvent &event)
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 9656d0c1c..f59f75ce2 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -219,7 +219,7 @@ ServerDialog::~ServerDialog()
mDownload->cancel();
delete2(mDownload)
}
- delete2(mServersListModel);
+ delete2(mServersListModel)
}
void ServerDialog::connectToSelectedServer()
diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp
index 46ac33da7..8b63a6a16 100644
--- a/src/gui/windows/setupwindow.cpp
+++ b/src/gui/windows/setupwindow.cpp
@@ -252,8 +252,8 @@ void SetupWindow::unloadAdditionalTabs()
{
unloadTab(mModsTab);
unloadTab(mQuickTab);
- delete2(mModsTab);
- delete2(mQuickTab);
+ delete2(mModsTab)
+ delete2(mQuickTab)
}
void SetupWindow::externalUnload()
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 91c7063de..e0306503d 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -248,11 +248,11 @@ ShopWindow::~ShopWindow()
{
saveList();
- delete2(mBuyShopItemList);
- delete2(mSellShopItemList);
- delete2(mBuyShopItems);
- delete2(mSellShopItems);
- delete2(mTradeItem);
+ delete2(mBuyShopItemList)
+ delete2(mSellShopItemList)
+ delete2(mBuyShopItems)
+ delete2(mSellShopItems)
+ delete2(mTradeItem)
instances.remove(this);
}
@@ -560,7 +560,7 @@ void ShopWindow::loadList()
if (!shopFile.is_open())
{
reportAlways("Error opening file for reading: %s",
- shopListName.c_str());
+ shopListName.c_str())
shopFile.close();
return;
}
@@ -616,7 +616,7 @@ void ShopWindow::saveList() const
if (!shopFile.is_open())
{
reportAlways("Error opening file writing: %s",
- shopListName.c_str());
+ shopListName.c_str())
return;
}
diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp
index 6d431c37c..40ddf6930 100644
--- a/src/gui/windows/shortcutwindow.cpp
+++ b/src/gui/windows/shortcutwindow.cpp
@@ -154,8 +154,8 @@ ShortcutWindow::~ShortcutWindow()
{
if (mTabs != nullptr)
mTabs->removeAll(true);
- delete2(mTabs);
- delete2(mItems);
+ delete2(mTabs)
+ delete2(mItems)
}
void ShortcutWindow::addButton(const std::string &text,
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 39235c570..2dd536c29 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -360,7 +360,7 @@ void SkillDialog::loadSkills()
if (mSkills.empty())
loadXmlFile(paths.getStringValue("skillsFile2"), SkipError_false);
loadXmlFile(paths.getStringValue("skillsPatchFile"), SkipError_true);
- loadXmlDir("skillsPatchDir", loadXmlFile);
+ loadXmlDir("skillsPatchDir", loadXmlFile)
addDefaultTab();
update();
@@ -452,7 +452,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName,
}
default:
reportAlways("Unsupported skillset type: %s",
- setTypeStr.c_str());
+ setTypeStr.c_str())
return;
}
if (mDefaultModel == nullptr)
@@ -1191,7 +1191,7 @@ void SkillDialog::useSkillTarget(const SkillInfo *const info,
}
else
{
- reportAlways("Unsupported skill type: %d", type);
+ reportAlways("Unsupported skill type: %d", type)
}
}
@@ -1276,7 +1276,7 @@ void SkillDialog::useSkillPosition(const SkillInfo *const info,
}
else
{
- reportAlways("Unsupported skill type: %d", type);
+ reportAlways("Unsupported skill type: %d", type)
}
}
@@ -1378,7 +1378,7 @@ void SkillDialog::useSkillDefault(const SkillInfo *const info,
}
else
{
- reportAlways("Unsupported skill type: %d", type);
+ reportAlways("Unsupported skill type: %d", type)
}
}
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index ab469cada..8cf7419a1 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -166,11 +166,11 @@ SocialWindow::~SocialWindow()
mPartyInviter.clear();
}
- delete2(mPlayers);
- delete2(mNavigation);
- delete2(mAttackFilter);
- delete2(mPickupFilter);
- delete2(mFriends);
+ delete2(mPlayers)
+ delete2(mNavigation)
+ delete2(mAttackFilter)
+ delete2(mPickupFilter)
+ delete2(mFriends)
FOR_EACH (GuildMap::iterator, it, mGuilds)
{
delete (*it).second;
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 3403e1b4c..4795ddb53 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -231,7 +231,7 @@ StatusWindow::StatusWindow() :
StatusWindow::~StatusWindow()
{
- delete2(mBasicStatsPage);
+ delete2(mBasicStatsPage)
delete_all(mPages);
}
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index c9d48f21c..f22551864 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -245,10 +245,10 @@ void TextCommandEditor::postInit()
TextCommandEditor::~TextCommandEditor()
{
- delete2(mIconsModel);
- delete2(mTargetTypeModel);
+ delete2(mIconsModel)
+ delete2(mTargetTypeModel)
#ifdef TMWA_SUPPORT
- delete2(mMagicSchoolModel);
+ delete2(mMagicSchoolModel)
#endif // TMWA_SUPPORT
}
diff --git a/src/gui/windows/textselectdialog.cpp b/src/gui/windows/textselectdialog.cpp
index 9991a5754..7049c478b 100644
--- a/src/gui/windows/textselectdialog.cpp
+++ b/src/gui/windows/textselectdialog.cpp
@@ -132,7 +132,7 @@ void TextSelectDialog::postInit()
TextSelectDialog::~TextSelectDialog()
{
- delete2(mModel);
+ delete2(mModel)
}
void TextSelectDialog::action(const ActionEvent &event)
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 606d2a380..8e7842a69 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -166,8 +166,8 @@ TradeWindow::TradeWindow() :
TradeWindow::~TradeWindow()
{
- delete2(mMyInventory);
- delete2(mPartnerInventory);
+ delete2(mMyInventory)
+ delete2(mPartnerInventory)
}
void TradeWindow::setMoney(const int amount)
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 5b810b38e..f8951b308 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -275,7 +275,7 @@ UpdaterWindow::~UpdaterWindow()
delete2(mDownload)
}
free(mMemoryBuffer);
- delete2(mItemLinkHandler);
+ delete2(mItemLinkHandler)
}
void UpdaterWindow::setProgress(const float p)
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index 86e6a0e87..ed40b6269 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -96,7 +96,7 @@ void WorldSelectDialog::postInit()
WorldSelectDialog::~WorldSelectDialog()
{
- delete2(mWorldListModel);
+ delete2(mWorldListModel)
}
void WorldSelectDialog::action(const ActionEvent &event)
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index a9a0fc29f..3e32621a1 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -906,7 +906,7 @@ bool InputManager::executeChatCommand(const std::string &restrict cmd,
{
reportAlways("Unknown chat command: /%s %s",
cmd.c_str(),
- args.c_str());
+ args.c_str())
}
return false;
}
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp
index 91e21dc1c..4f7c6e9aa 100644
--- a/src/input/joystick.cpp
+++ b/src/input/joystick.cpp
@@ -227,7 +227,7 @@ void Joystick::logic()
doCalibration();
BLOCK_END("Joystick::logic")
return;
- };
+ }
if (!mEnabled || !mCalibrated)
{
diff --git a/src/input/touch/touchmanager.cpp b/src/input/touch/touchmanager.cpp
index 95fcd26f6..8195a4640 100644
--- a/src/input/touch/touchmanager.cpp
+++ b/src/input/touch/touchmanager.cpp
@@ -200,7 +200,7 @@ void TouchManager::clear() restrict2
FOR_EACH (TouchItemVectorCIter, it, mObjects)
unload(*it);
mObjects.clear();
- delete2(mVertexes);
+ delete2(mVertexes)
mRedraw = true;
}
@@ -394,7 +394,7 @@ void TouchManager::unload(TouchItem *restrict const item)
if (item->images != nullptr)
{
Theme::unloadRect(*item->images, 0, 8);
- delete2(item->images);
+ delete2(item->images)
if (item->icon != nullptr)
{
item->icon->decRef();
@@ -647,7 +647,7 @@ void TouchManager::loadButtons() restrict2
nullptr, nullptr, nullptr, nullptr);
break;
}
- };
+ }
theme->unload(skin);
}
}
diff --git a/src/maingui.cpp b/src/maingui.cpp
index 908e2392b..e8f1cea12 100644
--- a/src/maingui.cpp
+++ b/src/maingui.cpp
@@ -149,7 +149,7 @@ int mainGui(int argc, char *argv[])
client->testsInit();
ret = Client::testsExec();
}
- delete2(client);
+ delete2(client)
VirtFs::deinit();
#if SDL_MIXER_VERSION_ATLEAST(1, 2, 11)
diff --git a/src/net/character.h b/src/net/character.h
index 3041c37a6..3c0c8f534 100644
--- a/src/net/character.h
+++ b/src/net/character.h
@@ -49,7 +49,7 @@ struct Character final
~Character()
{
- delete2(dummy);
+ delete2(dummy)
}
LocalPlayer *dummy; /**< A dummy representing this character */
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index faed9df20..848b8db91 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -52,12 +52,12 @@ InventoryHandler::~InventoryHandler()
storageWindow = nullptr;
}
- delete2(InventoryRecv::mStorage);
+ delete2(InventoryRecv::mStorage)
}
void InventoryHandler::clear() const
{
- delete2(InventoryRecv::mStorage);
+ delete2(InventoryRecv::mStorage)
}
bool InventoryHandler::canSplit(const Item *const item A_UNUSED) const
diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp
index 2e6a7e2ac..f95d0d40d 100644
--- a/src/net/ea/inventoryrecv.cpp
+++ b/src/net/ea/inventoryrecv.cpp
@@ -137,7 +137,7 @@ void InventoryRecv::processPlayerStorageClose(Net::MessageIn &msg A_UNUSED)
if (mStorage != nullptr)
mStorage->clear();
- delete2(mStorage);
+ delete2(mStorage)
BLOCK_END("InventoryRecv::processPlayerStorageClose")
}
diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp
index 11a0757f1..4a4c3d0df 100644
--- a/src/net/ea/network.cpp
+++ b/src/net/ea/network.cpp
@@ -90,9 +90,9 @@ Network::~Network()
SDL_DestroyMutex(mMutexOut);
mMutexOut = nullptr;
- delete2Arr(mInBuffer);
- delete2Arr(mOutBuffer);
- delete2Arr(mPackets);
+ delete2Arr(mInBuffer)
+ delete2Arr(mOutBuffer)
+ delete2Arr(mPackets)
TcpNet::quit();
}
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 715073a46..651d29be5 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -44,7 +44,7 @@ PartyHandler::PartyHandler() :
PartyHandler::~PartyHandler()
{
- delete2(partyTab);
+ delete2(partyTab)
taParty = nullptr;
}
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index ec7f4dc09..dc6a503bf 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -189,7 +189,7 @@ static void setBasicFields(Being *restrict const dstBeing,
case ActorType::Avatar:
case ActorType::Unknown:
reportAlways("Wrong being type detected: %d",
- CAST_S32(actorType));
+ CAST_S32(actorType))
break;
}
}
diff --git a/src/net/eathena/buysellrecv.cpp b/src/net/eathena/buysellrecv.cpp
index 9bb91520b..7f71a41ab 100644
--- a/src/net/eathena/buysellrecv.cpp
+++ b/src/net/eathena/buysellrecv.cpp
@@ -137,7 +137,7 @@ void BuySellRecv::processNpcBuyResponse(Net::MessageIn &msg)
default:
NotifyManager::notify(NotifyTypes::BUY_FAILED);
break;
- };
+ }
}
} // namespace EAthena
diff --git a/src/net/eathena/clanrecv.cpp b/src/net/eathena/clanrecv.cpp
index c2c5680db..e84ac7d3d 100644
--- a/src/net/eathena/clanrecv.cpp
+++ b/src/net/eathena/clanrecv.cpp
@@ -66,7 +66,7 @@ void ClanRecv::processClanInfo(Net::MessageIn &msg)
if (info == nullptr)
{
reportAlways("missing clan %d in clandb",
- localClan.id);
+ localClan.id)
}
else
{
@@ -85,7 +85,7 @@ void ClanRecv::processClanOnlineCount(Net::MessageIn &msg)
void ClanRecv::processClanLeave(Net::MessageIn &msg A_UNUSED)
{
- delete2(clanTab);
+ delete2(clanTab)
localClan.clear();
clanWindow->resetClan();
}
@@ -99,7 +99,7 @@ void ClanRecv::processClanChat(Net::MessageIn &msg)
std::string chatMsg = msg.readString(chatMsgLength, "message");
if (clanTab == nullptr)
{
- reportAlways("received clan chat messages without clan.");
+ reportAlways("received clan chat messages without clan.")
return;
}
const size_t pos = chatMsg.find(" : ", 0);
diff --git a/src/net/eathena/elementalrecv.cpp b/src/net/eathena/elementalrecv.cpp
index 9d97b10b7..071a74c79 100644
--- a/src/net/eathena/elementalrecv.cpp
+++ b/src/net/eathena/elementalrecv.cpp
@@ -38,7 +38,7 @@ namespace EAthena
PlayerInfo::setStatBase(stat, \
val, \
Notify_true); \
- break;
+ break
void ElementalRecv::processElementalUpdateStatus(Net::MessageIn &msg)
{
@@ -52,7 +52,7 @@ void ElementalRecv::processElementalUpdateStatus(Net::MessageIn &msg)
setElementalStat(Sp::MAXSP, Attributes::ELEMENTAL_MAX_MP);
default:
reportAlways("Unknown elemental stat %d",
- sp);
+ sp)
break;
}
}
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 940a27fd8..8c1063b84 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -126,46 +126,46 @@ GeneralHandler::GeneralHandler() :
GeneralHandler::~GeneralHandler()
{
- delete2(Network::mInstance);
+ delete2(Network::mInstance)
- delete2(mAdminHandler);
- delete2(mBeingHandler);
- delete2(mBuySellHandler);
- delete2(mCharServerHandler);
- delete2(mChatHandler);
- delete2(mClanHandler);
- delete2(mGameHandler);
- delete2(mGuildHandler);
- delete2(mInventoryHandler);
- delete2(mItemHandler);
- delete2(mLoginHandler);
- delete2(mNpcHandler);
- delete2(mPartyHandler);
- delete2(mPetHandler);
- delete2(mPlayerHandler);
- delete2(mSkillHandler);
- delete2(mTradeHandler);
- delete2(mQuestHandler);
- delete2(mServerFeatures);
- delete2(mMail2Handler);
- delete2(mMailHandler);
- delete2(mAuctionHandler);
- delete2(mAchievementHandler);
- delete2(mAttendanceHandler);
- delete2(mCashShopHandler);
- delete2(mFamilyHandler);
- delete2(mBankHandler);
- delete2(mBattleGroundHandler);
- delete2(mMercenaryHandler);
- delete2(mBuyingStoreHandler);
- delete2(mHomunculusHandler);
- delete2(mFriendsHandler);
- delete2(mElementalHandler);
- delete2(mMapHandler);
- delete2(mMarketHandler);
- delete2(mVendingHandler);
- delete2(mRouletteHandler);
- delete2(mSearchStoreHandler);
+ delete2(mAdminHandler)
+ delete2(mBeingHandler)
+ delete2(mBuySellHandler)
+ delete2(mCharServerHandler)
+ delete2(mChatHandler)
+ delete2(mClanHandler)
+ delete2(mGameHandler)
+ delete2(mGuildHandler)
+ delete2(mInventoryHandler)
+ delete2(mItemHandler)
+ delete2(mLoginHandler)
+ delete2(mNpcHandler)
+ delete2(mPartyHandler)
+ delete2(mPetHandler)
+ delete2(mPlayerHandler)
+ delete2(mSkillHandler)
+ delete2(mTradeHandler)
+ delete2(mQuestHandler)
+ delete2(mServerFeatures)
+ delete2(mMail2Handler)
+ delete2(mMailHandler)
+ delete2(mAuctionHandler)
+ delete2(mAchievementHandler)
+ delete2(mAttendanceHandler)
+ delete2(mCashShopHandler)
+ delete2(mFamilyHandler)
+ delete2(mBankHandler)
+ delete2(mBattleGroundHandler)
+ delete2(mMercenaryHandler)
+ delete2(mBuyingStoreHandler)
+ delete2(mHomunculusHandler)
+ delete2(mFriendsHandler)
+ delete2(mElementalHandler)
+ delete2(mMapHandler)
+ delete2(mMarketHandler)
+ delete2(mVendingHandler)
+ delete2(mRouletteHandler)
+ delete2(mSearchStoreHandler)
}
void GeneralHandler::load() const
@@ -249,9 +249,9 @@ void GeneralHandler::gameEnded() const
socialWindow->removeTab(Ea::taParty);
}
- delete2(guildTab);
- delete2(partyTab);
- delete2(clanTab);
+ delete2(guildTab)
+ delete2(partyTab)
+ delete2(clanTab)
}
} // namespace EAthena
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 3cd3c2fba..320894d22 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -52,7 +52,7 @@ GuildHandler::GuildHandler() :
GuildHandler::~GuildHandler()
{
- delete2(guildTab);
+ delete2(guildTab)
guildHandler = nullptr;
taGuild = nullptr;
}
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp
index b5450e1aa..81010a230 100644
--- a/src/net/eathena/guildrecv.cpp
+++ b/src/net/eathena/guildrecv.cpp
@@ -208,7 +208,7 @@ void GuildRecv::processGuildMemberList(Net::MessageIn &msg)
if (msg.getVersion() >= 20161026)
{
guildSize = 34;
- reportAlways("missing guild member names");
+ reportAlways("missing guild member names")
}
else
{
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp
index 7097333bc..3a0c99ac0 100644
--- a/src/net/eathena/mail2handler.cpp
+++ b/src/net/eathena/mail2handler.cpp
@@ -108,7 +108,7 @@ void Mail2Handler::sendMail(const std::string &to,
int32_t sz = 2 + 2 + 24 + 24 + 8 + 2 + 2 + titleSz + bodySz;
if (sz > 32767 - 4)
{
- reportAlways("Mail message too big");
+ reportAlways("Mail message too big")
return;
}
if (packetVersion >= 20160600)
diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp
index d22bc211e..2cb585829 100644
--- a/src/net/eathena/mail2recv.cpp
+++ b/src/net/eathena/mail2recv.cpp
@@ -104,14 +104,14 @@ void Mail2Recv::processAddItemResult(Net::MessageIn &msg)
if (mailEditWindow == nullptr)
{
- reportAlways("Mail edit window not created");
+ reportAlways("Mail edit window not created")
delete options;
return;
}
Inventory *const inventory = mailEditWindow->getInventory();
if (inventory == nullptr)
{
- reportAlways("Mail edit window inventory not exists");
+ reportAlways("Mail edit window inventory not exists")
delete options;
return;
}
@@ -189,7 +189,7 @@ void Mail2Recv::processRemoveItemResult(Net::MessageIn &msg)
const Inventory *const inv = PlayerInfo::getInventory();
if (inv == nullptr)
{
- reportAlways("Player inventory not exists");
+ reportAlways("Player inventory not exists")
return;
}
std::string itemName;
@@ -211,25 +211,25 @@ void Mail2Recv::processRemoveItemResult(Net::MessageIn &msg)
}
if (mailEditWindow == nullptr)
{
- reportAlways("Mail edit window not created");
+ reportAlways("Mail edit window not created")
return;
}
Inventory *const inventory = mailEditWindow->getInventory();
if (inventory == nullptr)
{
- reportAlways("Mail edit window inventory not exists");
+ reportAlways("Mail edit window inventory not exists")
return;
}
const int index2 = inventory->findIndexByTag(index);
if (index2 == -1)
{
- reportAlways("Item not exists in mail edit window.");
+ reportAlways("Item not exists in mail edit window.")
return;
}
Item *const item = inventory->getItem(index2);
if (item == nullptr)
{
- reportAlways("Item not exists.");
+ reportAlways("Item not exists.")
return;
}
@@ -248,7 +248,7 @@ void Mail2Recv::processCheckNameResult(Net::MessageIn &msg)
if (mMailQueue.empty())
{
reportAlways("Mail2Recv::processCheckNameResult no names in queue."
- "Char id: %d", charId);
+ "Char id: %d", charId)
return;
}
MailQueue *const mail = mMailQueue.front();
@@ -272,7 +272,7 @@ void Mail2Recv::processCheckNameResult(Net::MessageIn &msg)
case MailQueueType::EditMail:
if (mailWindow == nullptr)
{
- reportAlways("Mail window not created");
+ reportAlways("Mail window not created")
}
else
{
@@ -282,7 +282,7 @@ void Mail2Recv::processCheckNameResult(Net::MessageIn &msg)
case MailQueueType::ValidateTo:
if (mailEditWindow == nullptr)
{
- reportAlways("Mail edit window not created");
+ reportAlways("Mail edit window not created")
}
else
{
@@ -291,7 +291,7 @@ void Mail2Recv::processCheckNameResult(Net::MessageIn &msg)
break;
case MailQueueType::Unknown:
default:
- reportAlways("Not implemented yet.");
+ reportAlways("Not implemented yet.")
break;
}
delete mail;
@@ -329,7 +329,7 @@ void Mail2Recv::processMailListPage(Net::MessageIn &msg)
{
if (mailWindow == nullptr)
{
- reportAlways("mail window not created");
+ reportAlways("mail window not created")
return;
}
msg.readInt16("len");
@@ -405,7 +405,7 @@ void Mail2Recv::processReadMail(Net::MessageIn &msg)
if (mail == nullptr)
{
- reportAlways("Mail message not found");
+ reportAlways("Mail message not found")
for (int f = 0; f < itemsCount; f ++)
{
msg.readInt16("amount");
@@ -490,7 +490,7 @@ void Mail2Recv::processMailDelete(Net::MessageIn &msg)
const int64_t mailId = msg.readInt64("mail id");
if (mailWindow == nullptr)
{
- reportAlways("Mail window not created.");
+ reportAlways("Mail window not created.")
return;
}
mailWindow->removeMail(mailId);
diff --git a/src/net/eathena/mailrecv.cpp b/src/net/eathena/mailrecv.cpp
index 94e6c6fb9..d759e0fa3 100644
--- a/src/net/eathena/mailrecv.cpp
+++ b/src/net/eathena/mailrecv.cpp
@@ -122,21 +122,21 @@ void MailRecv::processReadMail(Net::MessageIn &msg)
mail->strTime = timeToStr(mail->time);
if (mailWindow == nullptr)
{
- reportAlways("Mail window not created");
+ reportAlways("Mail window not created")
delete mail;
return;
}
mailWindow->showMessage(mail, itemId != 0 ? 1 : 0);
if (mailViewWindow == nullptr)
{
- reportAlways("Mail view window not created");
+ reportAlways("Mail view window not created")
return;
}
Inventory *const inventory = mailViewWindow->getInventory();
if (inventory == nullptr)
{
- reportAlways("Mail view window missing inventory");
+ reportAlways("Mail view window missing inventory")
return;
}
diff --git a/src/net/eathena/mercenaryrecv.cpp b/src/net/eathena/mercenaryrecv.cpp
index bd4579c83..e9d351b37 100644
--- a/src/net/eathena/mercenaryrecv.cpp
+++ b/src/net/eathena/mercenaryrecv.cpp
@@ -47,7 +47,7 @@ namespace EAthena
PlayerInfo::setStatBase(stat, \
val, \
Notify_true); \
- break;
+ break
void MercenaryRecv::processMercenaryUpdate(Net::MessageIn &msg)
{
@@ -71,7 +71,7 @@ void MercenaryRecv::processMercenaryUpdate(Net::MessageIn &msg)
setMercStat(Sp::MERCFAITH, Attributes::MERC_FAITH);
default:
reportAlways("Unknown mercenary stat %d",
- sp);
+ sp)
break;
}
}
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index c183d842c..9fcccb378 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -133,7 +133,7 @@ void Network::registerFakeHandlers()
const size_t id = (*it).first;
if (id >= packet_lengths_size)
{
- reportAlways("Wrong fake packet id %d", CAST_S32(id));
+ reportAlways("Wrong fake packet id %d", CAST_S32(id))
continue;
}
if (mPackets[id].len != 0 ||
@@ -159,7 +159,7 @@ void Network::registerFakeHandlers()
const size_t id = *it;
if (id >= packet_lengths_size)
{
- reportAlways("Wrong remove packet id %d", CAST_S32(id));
+ reportAlways("Wrong remove packet id %d", CAST_S32(id))
continue;
}
if (mPackets[id].len == 0 &&
diff --git a/src/net/eathena/partyrecv.cpp b/src/net/eathena/partyrecv.cpp
index 21b97dfad..026dafbfc 100644
--- a/src/net/eathena/partyrecv.cpp
+++ b/src/net/eathena/partyrecv.cpp
@@ -117,7 +117,7 @@ void PartyRecv::processPartyMemberJobLevel(Net::MessageIn &msg)
}
else
{
- reportAlways("processPartyMemberJobLevel: party member not exists.");
+ reportAlways("processPartyMemberJobLevel: party member not exists.")
}
}
diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp
index 32336249d..da3e35a0d 100644
--- a/src/net/eathena/playerrecv.cpp
+++ b/src/net/eathena/playerrecv.cpp
@@ -507,7 +507,7 @@ void PlayerRecv::processKilledBy(Net::MessageIn &msg)
{
debugMsg(
// TRANSLATORS: player killed message
- _("You were killed by unknown source."));
+ _("You were killed by unknown source."))
}
else
{
@@ -519,7 +519,7 @@ void PlayerRecv::processKilledBy(Net::MessageIn &msg)
debugMsg(strprintf(
// TRANSLATORS: player killed message
_("You were killed by %s."),
- name.c_str()));
+ name.c_str()))
}
}
diff --git a/src/net/ipc.cpp b/src/net/ipc.cpp
index 2b4573cba..324ad4565 100644
--- a/src/net/ipc.cpp
+++ b/src/net/ipc.cpp
@@ -156,7 +156,7 @@ void IPC::stop()
return;
logger->log("Stopping IPC...");
- delete2(ipc);
+ delete2(ipc)
}
void IPC::start()
@@ -183,7 +183,7 @@ void IPC::start()
port ++;
}
- delete2(ipc);
+ delete2(ipc)
}
void IPC::flush()
diff --git a/src/net/net.cpp b/src/net/net.cpp
index f9422c367..98e81576c 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -136,7 +136,7 @@ void connectToServer(const ServerInfo &server)
generalHandler != nullptr)
{
generalHandler->unload();
- delete2(generalHandler);
+ delete2(generalHandler)
}
switch (server.type)
@@ -178,7 +178,7 @@ void unload()
if (handler != nullptr)
handler->unload();
ignorePackets.clear();
- delete2(generalHandler);
+ delete2(generalHandler)
}
ServerTypeT getNetworkType()
diff --git a/src/net/packetlimiter.cpp b/src/net/packetlimiter.cpp
index 50279b22c..dbf29ffd7 100644
--- a/src/net/packetlimiter.cpp
+++ b/src/net/packetlimiter.cpp
@@ -230,7 +230,7 @@ void PacketLimiter::writePacketLimits(const std::string &packetLimitsName)
if (!outPacketFile.is_open())
{
reportAlways("Error opening file for writing: %s",
- packetLimitsName.c_str());
+ packetLimitsName.c_str())
outPacketFile.close();
return;
}
diff --git a/src/net/tmwa/buysellrecv.cpp b/src/net/tmwa/buysellrecv.cpp
index b30ebc501..17568c756 100644
--- a/src/net/tmwa/buysellrecv.cpp
+++ b/src/net/tmwa/buysellrecv.cpp
@@ -117,7 +117,7 @@ void BuySellRecv::processNpcBuyResponse(Net::MessageIn &msg)
default:
NotifyManager::notify(NotifyTypes::BUY_FAILED);
break;
- };
+ }
}
} // namespace TmwAthena
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 99865f61d..57509a717 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -125,46 +125,46 @@ GeneralHandler::GeneralHandler() :
GeneralHandler::~GeneralHandler()
{
- delete2(Network::mInstance);
-
- delete2(mAdminHandler);
- delete2(mBeingHandler);
- delete2(mBuySellHandler);
- delete2(mCharServerHandler);
- delete2(mChatHandler);
- delete2(mClanHandler);
- delete2(mGameHandler);
- delete2(mGuildHandler);
- delete2(mInventoryHandler);
- delete2(mItemHandler);
- delete2(mLoginHandler);
- delete2(mNpcHandler);
- delete2(mPartyHandler);
- delete2(mPetHandler);
- delete2(mPlayerHandler);
- delete2(mSkillHandler);
- delete2(mTradeHandler);
- delete2(mQuestHandler);
- delete2(mServerFeatures);
- delete2(mAuctionHandler);
- delete2(mAchievementHandler);
- delete2(mAttendanceHandler);
- delete2(mBankHandler);
- delete2(mBattleGroundHandler);
- delete2(mBuyingStoreHandler);
- delete2(mCashShopHandler);
- delete2(mElementalHandler);
- delete2(mFamilyHandler);
- delete2(mFriendsHandler);
- delete2(mHomunculusHandler);
- delete2(mMail2Handler);
- delete2(mMailHandler);
- delete2(mMapHandler);
- delete2(mMarketHandler);
- delete2(mMercenaryHandler);
- delete2(mRouletteHandler);
- delete2(mSearchStoreHandler);
- delete2(mVendingHandler);
+ delete2(Network::mInstance)
+
+ delete2(mAdminHandler)
+ delete2(mBeingHandler)
+ delete2(mBuySellHandler)
+ delete2(mCharServerHandler)
+ delete2(mChatHandler)
+ delete2(mClanHandler)
+ delete2(mGameHandler)
+ delete2(mGuildHandler)
+ delete2(mInventoryHandler)
+ delete2(mItemHandler)
+ delete2(mLoginHandler)
+ delete2(mNpcHandler)
+ delete2(mPartyHandler)
+ delete2(mPetHandler)
+ delete2(mPlayerHandler)
+ delete2(mSkillHandler)
+ delete2(mTradeHandler)
+ delete2(mQuestHandler)
+ delete2(mServerFeatures)
+ delete2(mAuctionHandler)
+ delete2(mAchievementHandler)
+ delete2(mAttendanceHandler)
+ delete2(mBankHandler)
+ delete2(mBattleGroundHandler)
+ delete2(mBuyingStoreHandler)
+ delete2(mCashShopHandler)
+ delete2(mElementalHandler)
+ delete2(mFamilyHandler)
+ delete2(mFriendsHandler)
+ delete2(mHomunculusHandler)
+ delete2(mMail2Handler)
+ delete2(mMailHandler)
+ delete2(mMapHandler)
+ delete2(mMarketHandler)
+ delete2(mMercenaryHandler)
+ delete2(mRouletteHandler)
+ delete2(mSearchStoreHandler)
+ delete2(mVendingHandler)
}
void GeneralHandler::load() const
@@ -249,7 +249,7 @@ void GeneralHandler::gameEnded() const
if (socialWindow != nullptr)
socialWindow->removeTab(Ea::taParty);
- delete2(partyTab);
+ delete2(partyTab)
}
} // namespace TmwAthena
diff --git a/src/net/tmwa/guildmanager.cpp b/src/net/tmwa/guildmanager.cpp
index b491b250d..aaf8562ac 100644
--- a/src/net/tmwa/guildmanager.cpp
+++ b/src/net/tmwa/guildmanager.cpp
@@ -66,7 +66,7 @@ GuildManager::GuildManager() :
GuildManager::~GuildManager()
{
- delete2(mTab);
+ delete2(mTab)
}
void GuildManager::init()
@@ -90,7 +90,7 @@ void GuildManager::init()
}
else if (guildManager != nullptr)
{
- delete2(guildManager);
+ delete2(guildManager)
}
}
@@ -112,7 +112,7 @@ void GuildManager::reload()
if ((guild != nullptr) && (socialWindow != nullptr))
socialWindow->removeTab(guild);
}
- delete2(mTab);
+ delete2(mTab)
}
void GuildManager::send(const std::string &msg)
@@ -528,7 +528,7 @@ bool GuildManager::afterRemove()
localPlayer->clearGuilds();
}
NotifyManager::notify(NotifyTypes::GUILD_LEFT);
- delete2(mTab);
+ delete2(mTab)
if (socialWindow != nullptr)
socialWindow->removeTab(guild);
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp
index dacb7b1f2..dc0cacc56 100644
--- a/src/particle/particle.cpp
+++ b/src/particle/particle.cpp
@@ -98,7 +98,7 @@ Particle::~Particle()
}
// Delete child emitters and child particles
clear();
- delete2(mAnimation);
+ delete2(mAnimation)
if (mImage != nullptr)
{
if (mType == ParticleType::Image)
diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp
index a905c326b..f31f2524a 100644
--- a/src/progs/dyecmd/client.cpp
+++ b/src/progs/dyecmd/client.cpp
@@ -443,15 +443,15 @@ void Client::gameClear()
stopTimers();
- delete2(ipc);
+ delete2(ipc)
if (logger != nullptr)
logger->log1("Quitting2");
- delete2(mCurrentDialog);
- delete2(popupManager);
- delete2(dialogsManager);
- delete2(gui);
+ delete2(mCurrentDialog)
+ delete2(popupManager)
+ delete2(dialogsManager)
+ delete2(gui)
if (logger != nullptr)
logger->log1("Quitting3");
@@ -484,7 +484,7 @@ void Client::gameClear()
if (logger != nullptr)
logger->log1("Quitting9");
- delete2(joystick);
+ delete2(joystick)
keyboard.deinit();
@@ -521,7 +521,7 @@ void Client::gameClear()
if (logger != nullptr)
logger->log1("Quitting12");
-// delete2(chatLogger);
+// delete2(chatLogger)
TranslationManager::close();
VirtFs::deinit();
}
@@ -646,7 +646,7 @@ int Client::gameExec()
mOldState = mState;
// Get rid of the dialog of the previous state
- delete2(mCurrentDialog);
+ delete2(mCurrentDialog)
// State has changed, while the quitDialog was active, it might
// not be correct anymore
diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp
index 452f0c368..785eed7ca 100644
--- a/src/progs/manaplus/actions/actions.cpp
+++ b/src/progs/manaplus/actions/actions.cpp
@@ -184,7 +184,7 @@ static int uploadUpdate(void *ptr,
}
}
}
-// delete2(info->upload);
+// delete2(info->upload)
info->upload = nullptr;
delete info;
return 0;
diff --git a/src/progs/manaplus/actions/statusbar.cpp b/src/progs/manaplus/actions/statusbar.cpp
index e15694902..52d5a0e51 100644
--- a/src/progs/manaplus/actions/statusbar.cpp
+++ b/src/progs/manaplus/actions/statusbar.cpp
@@ -55,7 +55,7 @@ namespace Actions
impHandler0(switchQuickDrop)
{
- callYellowBarCond(changeQuickDropCounter)
+ callYellowBarCond(changeQuickDropCounter);
}
impHandler0(changeCrazyMove)
diff --git a/src/progs/manaplus/client.cpp b/src/progs/manaplus/client.cpp
index dabfe293b..fb239ba7f 100644
--- a/src/progs/manaplus/client.cpp
+++ b/src/progs/manaplus/client.cpp
@@ -651,7 +651,7 @@ void Client::gameClear()
isTerminate = true;
config.removeListeners(this);
- delete2(assertListener);
+ delete2(assertListener)
IPC::stop();
eventsManager.shutdown();
@@ -671,10 +671,10 @@ void Client::gameClear()
if (charServerHandler != nullptr)
charServerHandler->clear();
- delete2(ipc);
+ delete2(ipc)
#ifdef USE_MUMBLE
- delete2(mumbleManager);
+ delete2(mumbleManager)
#endif // USE_MUMBLE
PlayerInfo::deinit();
@@ -682,18 +682,18 @@ void Client::gameClear()
// Before config.write() since it writes the shortcuts to the config
for (unsigned f = 0; f < SHORTCUT_TABS; f ++)
delete2(itemShortcut[f])
- delete2(emoteShortcut);
- delete2(dropShortcut);
+ delete2(emoteShortcut)
+ delete2(dropShortcut)
playerRelations.store();
if (logger != nullptr)
logger->log1("Quitting2");
- delete2(mCurrentDialog);
- delete2(popupManager);
- delete2(dialogsManager);
- delete2(gui);
+ delete2(mCurrentDialog)
+ delete2(popupManager)
+ delete2(dialogsManager)
+ delete2(gui)
if (inventoryHandler != nullptr)
inventoryHandler->clear();
@@ -735,7 +735,7 @@ void Client::gameClear()
if (logger != nullptr)
logger->log1("Quitting9");
- delete2(joystick);
+ delete2(joystick)
keyboard.deinit();
@@ -772,7 +772,7 @@ void Client::gameClear()
if (logger != nullptr)
logger->log1("Quitting12");
- delete2(chatLogger);
+ delete2(chatLogger)
TranslationManager::close();
}
@@ -1049,7 +1049,7 @@ int Client::gameExec()
if (mOldState == State::GAME)
{
- delete2(mGame);
+ delete2(mGame)
assertListener = new AssertListener;
Game::clearInstance();
ResourceManager::cleanOrphans(false);
@@ -1081,7 +1081,7 @@ int Client::gameExec()
mOldState = mState;
// Get rid of the dialog of the previous state
- delete2(mCurrentDialog);
+ delete2(mCurrentDialog)
// State has changed, while the quitDialog was active, it might
// not be correct anymore
@@ -1395,16 +1395,16 @@ int Client::gameExec()
chatLogger->setServerName(settings.serverName);
#ifdef ANDROID
- delete2(mCloseButton);
+ delete2(mCloseButton)
#endif // ANDROID
- delete2(mSetupButton);
- delete2(mVideoButton);
- delete2(mThemesButton);
- delete2(mAboutButton);
- delete2(mHelpButton);
- delete2(mPerfomanceButton);
- delete2(desktop);
+ delete2(mSetupButton)
+ delete2(mVideoButton)
+ delete2(mThemesButton)
+ delete2(mAboutButton)
+ delete2(mHelpButton)
+ delete2(mPerfomanceButton)
+ delete2(desktop)
mCurrentDialog = nullptr;
@@ -1846,7 +1846,7 @@ void Client::initTradeFilter()
else
{
reportAlways("Error opening file for writing: %s",
- tradeListName.c_str());
+ tradeListName.c_str())
}
tradeFile.close();
}
@@ -2075,7 +2075,7 @@ void Client::runValidate()
WindowManager::deleteValidateWindows();
unloadData();
- delete2(client);
+ delete2(client)
VirtFs::deinit();
exit(0);
}
diff --git a/src/progs/manaplus/gui/viewport.cpp b/src/progs/manaplus/gui/viewport.cpp
index d3ed684e2..83ddef480 100644
--- a/src/progs/manaplus/gui/viewport.cpp
+++ b/src/progs/manaplus/gui/viewport.cpp
@@ -504,7 +504,7 @@ bool Viewport::leftMouseAction()
case ActorType::Avatar:
default:
reportAlways("Left click on unknown actor type: %d",
- CAST_S32(type));
+ CAST_S32(type))
break;
}
}
diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp
index 73579005a..a89759d2b 100644
--- a/src/render/mobileopengl2graphics.cpp
+++ b/src/render/mobileopengl2graphics.cpp
@@ -75,7 +75,7 @@
var[vp + 20] = dstX + w; \
var[vp + 21] = dstY + h; \
var[vp + 22] = x2; \
- var[vp + 23] = y2;
+ var[vp + 23] = y2
#define toGL static_cast<GLfloat>
@@ -128,7 +128,7 @@ MobileOpenGL2Graphics::~MobileOpenGL2Graphics()
void MobileOpenGL2Graphics::deleteGLObjects() restrict2
{
- delete2(mProgram);
+ delete2(mProgram)
if (mVbo != 0U)
mglDeleteBuffers(1, &mVbo);
#ifndef __native_client__
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index c8cbb7bba..7465ef3ff 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -68,7 +68,7 @@
vVar[vp + 8] = static_cast<GLshort>(dstX); \
vVar[vp + 9] = static_cast<GLshort>(dstY + h); \
vVar[vp + 10] = static_cast<GLshort>(dstX + w); \
- vVar[vp + 11] = static_cast<GLshort>(dstY + h);
+ vVar[vp + 11] = static_cast<GLshort>(dstY + h)
GLuint MobileOpenGLGraphics::mTextureBinded = 0;
#ifdef DEBUG_DRAW_CALLS
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index e742db33e..94efe61a4 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -77,7 +77,7 @@
var[vp + 20] = dstX + w; \
var[vp + 21] = dstY + h; \
var[vp + 22] = x2; \
- var[vp + 23] = y2;
+ var[vp + 23] = y2
GLuint ModernOpenGLGraphics::mTextureBinded = 0;
#ifdef DEBUG_DRAW_CALLS
@@ -125,7 +125,7 @@ ModernOpenGLGraphics::~ModernOpenGLGraphics()
void ModernOpenGLGraphics::deleteGLObjects() restrict2
{
- delete2(mProgram);
+ delete2(mProgram)
if (mVbo != 0U)
{
// logger->log("delete buffer vbo: %u", mVbo);
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index edaeb17cb..f9f84a030 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -59,7 +59,7 @@
vVar[vp + 4] = dstX + w; \
vVar[vp + 5] = dstY + h; \
vVar[vp + 6] = dstX; \
- vVar[vp + 7] = dstY + h;
+ vVar[vp + 7] = dstY + h
#define vertFillNv(tVar, vVar, srcX, srcY, dstX, dstY, w, h) \
@@ -78,7 +78,7 @@
vVar[vp + 4] = dstX + w; \
vVar[vp + 5] = dstY + h; \
vVar[vp + 6] = dstX; \
- vVar[vp + 7] = dstY + h;
+ vVar[vp + 7] = dstY + h
namespace
{
diff --git a/src/render/openglx/mglxinit.cpp b/src/render/openglx/mglxinit.cpp
index 74c378ed4..d73d981c6 100644
--- a/src/render/openglx/mglxinit.cpp
+++ b/src/render/openglx/mglxinit.cpp
@@ -30,13 +30,13 @@
void Glx::initFunctions()
{
- assignFunction(glXCreateContext);
- assignFunction(glXGetCurrentContext);
- assignFunctionARB(glXCreateContextAttribs);
- assignFunction(glXChooseFBConfig);
- assignFunction(glXDestroyContext);
- assignFunction(glXMakeCurrent);
- assignFunction(glXSwapBuffers);
+ assignFunction(glXCreateContext)
+ assignFunction(glXGetCurrentContext)
+ assignFunctionARB(glXCreateContextAttribs)
+ assignFunction(glXChooseFBConfig)
+ assignFunction(glXDestroyContext)
+ assignFunction(glXMakeCurrent)
+ assignFunction(glXSwapBuffers)
}
#endif // defined(USE_OPENGL) && defined(USE_X11)
diff --git a/src/resources/animation/simpleanimation.cpp b/src/resources/animation/simpleanimation.cpp
index 11ec9a01b..de9375489 100644
--- a/src/resources/animation/simpleanimation.cpp
+++ b/src/resources/animation/simpleanimation.cpp
@@ -67,7 +67,7 @@ SimpleAnimation::SimpleAnimation(XmlNodeConstPtr animationNode,
SimpleAnimation::~SimpleAnimation()
{
- delete2(mAnimation);
+ delete2(mAnimation)
if (mImageSet != nullptr)
{
mImageSet->decRef();
@@ -185,7 +185,7 @@ void SimpleAnimation::initializeAnimation(XmlNodeConstPtr animationNode,
if (index < 0)
{
- reportAlways("No valid value for 'index'");
+ reportAlways("No valid value for 'index'")
continue;
}
@@ -193,7 +193,7 @@ void SimpleAnimation::initializeAnimation(XmlNodeConstPtr animationNode,
if (img == nullptr)
{
- reportAlways("No image at index %d", index);
+ reportAlways("No image at index %d", index)
continue;
}
@@ -207,7 +207,7 @@ void SimpleAnimation::initializeAnimation(XmlNodeConstPtr animationNode,
if (start < 0 || end < 0)
{
- reportAlways("No valid value for 'start' or 'end'");
+ reportAlways("No valid value for 'start' or 'end'")
continue;
}
@@ -217,7 +217,7 @@ void SimpleAnimation::initializeAnimation(XmlNodeConstPtr animationNode,
if (img == nullptr)
{
- reportAlways("No image at index %d", start);
+ reportAlways("No image at index %d", start)
continue;
}
diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp
index 783e8b137..e1c847909 100644
--- a/src/resources/atlas/atlasmanager.cpp
+++ b/src/resources/atlas/atlasmanager.cpp
@@ -348,7 +348,7 @@ void AtlasManager::createSDLAtlas(TextureAtlas *const atlas)
{
reportAlways("Error creating surface for atlas. Size: %dx%d",
width,
- height);
+ height)
BLOCK_END("AtlasManager::createSDLAtlas")
return;
}
@@ -365,7 +365,7 @@ void AtlasManager::createSDLAtlas(TextureAtlas *const atlas)
{
reportAlways("Error converting surface to texture. Size: %dx%d",
width,
- height);
+ height)
return;
}
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index d7ffc2882..04c900538 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -215,8 +215,8 @@ void BeingInfo::addAttack(const int id,
void BeingInfo::clear()
{
- delete2(unknown);
- delete2(empty);
+ delete2(unknown)
+ delete2(empty)
}
void BeingInfo::init()
diff --git a/src/resources/db/avatardb.cpp b/src/resources/db/avatardb.cpp
index 3bc8f8a2c..4502b93f8 100644
--- a/src/resources/db/avatardb.cpp
+++ b/src/resources/db/avatardb.cpp
@@ -50,7 +50,7 @@ void AvatarDB::load()
logger->log1("Initializing avatar database...");
loadXmlFile(paths.getStringValue("avatarsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("avatarsPatchFile"), SkipError_true);
- loadXmlDir("avatarsPatchDir", loadXmlFile);
+ loadXmlDir("avatarsPatchDir", loadXmlFile)
}
void AvatarDB::loadXmlFile(const std::string &fileName,
diff --git a/src/resources/db/clandb.cpp b/src/resources/db/clandb.cpp
index c613067e3..52959e4f9 100644
--- a/src/resources/db/clandb.cpp
+++ b/src/resources/db/clandb.cpp
@@ -50,7 +50,7 @@ void ClanDb::load()
logger->log1("Initializing clans database...");
loadXmlFile(paths.getStringValue("clansFile"), SkipError_false);
loadXmlFile(paths.getStringValue("clansPatchFile"), SkipError_true);
- loadXmlDir("clansPatchDir", loadXmlFile);
+ loadXmlDir("clansPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -90,7 +90,7 @@ void ClanDb::loadXmlFile(const std::string &fileName,
ClanInfo *clanInfo = nullptr;
if (mClansInfos.find(id) != mClansInfos.end())
{
- reportAlways("ClanDb: Redefinition of clan ID %d", id);
+ reportAlways("ClanDb: Redefinition of clan ID %d", id)
clanInfo = mClansInfos[id];
}
if (clanInfo == nullptr)
@@ -130,7 +130,7 @@ const ClanInfo *ClanDb::get(const int clanId)
{
reportAlways("ClanDb: Warning, unknown clan ID "
"%d requested",
- clanId);
+ clanId)
return nullptr;
}
}
diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp
index 236c4d934..401f67ed2 100644
--- a/src/resources/db/colordb.cpp
+++ b/src/resources/db/colordb.cpp
@@ -67,7 +67,7 @@ void ColorDB::load()
SkipError_false);
loadColorLists(paths.getStringValue("itemColorsPatchFile"),
SkipError_true);
- loadXmlDir("itemColorsPatchDir", loadColorLists);
+ loadXmlDir("itemColorsPatchDir", loadColorLists)
it = mColorLists.find("hair");
if (it != mColorLists.end())
@@ -95,7 +95,7 @@ void ColorDB::loadHair(const std::string &fileName,
return;
}
- reportAlways("Found legacy hair.xml");
+ reportAlways("Found legacy hair.xml")
for_each_xml_child_node(node, root)
{
if (xmlNameEqual(node, "include"))
@@ -113,7 +113,7 @@ void ColorDB::loadHair(const std::string &fileName,
if (colors.find(id) != colors.end())
{
reportAlways("ColorDB: Redefinition of dye ID %d",
- toInt(id, int));
+ toInt(id, int))
}
colors[id] = ItemColorData(id, XML::langProperty(node, "name", ""),
@@ -194,7 +194,7 @@ std::string &ColorDB::getHairColorName(const ItemColor id)
const ColorListsIterator it = mColorLists.find("hair");
if (it == mColorLists.end())
{
- reportAlways("ColorDB: Error, hair colors list empty");
+ reportAlways("ColorDB: Error, hair colors list empty")
return mFail;
}
@@ -203,7 +203,7 @@ std::string &ColorDB::getHairColorName(const ItemColor id)
if (i == (*it).second.end())
{
reportAlways("ColorDB: Error, unknown dye ID# %d",
- toInt(id, int));
+ toInt(id, int))
return mFail;
}
return i->second.name;
diff --git a/src/resources/db/commandsdb.cpp b/src/resources/db/commandsdb.cpp
index ab98e7402..8195205d9 100644
--- a/src/resources/db/commandsdb.cpp
+++ b/src/resources/db/commandsdb.cpp
@@ -45,7 +45,7 @@ void CommandsDB::load()
SkipError_false);
loadXmlFile(paths.getStringValue("defaultCommandsPatchFile"),
SkipError_true);
- loadXmlDir("defaultCommandsPatchDir", loadXmlFile);
+ loadXmlDir("defaultCommandsPatchDir", loadXmlFile)
mLoaded = true;
}
diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp
index cd921d05a..11f681bb1 100644
--- a/src/resources/db/deaddb.cpp
+++ b/src/resources/db/deaddb.cpp
@@ -44,7 +44,7 @@ void DeadDB::load()
loadXmlFile(paths.getStringValue("deadMessagesFile"), SkipError_false);
loadXmlFile(paths.getStringValue("deadMessagesPatchFile"), SkipError_true);
- loadXmlDir("deadMessagesPatchDir", loadXmlFile);
+ loadXmlDir("deadMessagesPatchDir", loadXmlFile)
mLoaded = true;
}
diff --git a/src/resources/db/elementaldb.cpp b/src/resources/db/elementaldb.cpp
index 4263c930c..a1c55ef67 100644
--- a/src/resources/db/elementaldb.cpp
+++ b/src/resources/db/elementaldb.cpp
@@ -46,7 +46,7 @@ void ElementalDb::load()
logger->log1("Initializing elemental database...");
loadXmlFile(paths.getStringValue("elementalsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("elementalsPatchFile"), SkipError_true);
- loadXmlDir("elementalsPatchDir", loadXmlFile);
+ loadXmlDir("elementalsPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -145,7 +145,7 @@ BeingInfo *ElementalDb::get(const BeingTypeId id)
{
reportAlways("ElementalDb: Warning, unknown elemental ID "
"%d requested",
- toInt(id, int));
+ toInt(id, int))
return BeingInfo::unknown;
}
}
diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp
index 05808170a..65a1e0179 100644
--- a/src/resources/db/emotedb.cpp
+++ b/src/resources/db/emotedb.cpp
@@ -63,7 +63,7 @@ void EmoteDB::load()
mLastEmote = 0;
loadXmlFile(paths.getStringValue("emotesFile"), SkipError_false);
loadXmlFile(paths.getStringValue("emotesPatchFile"), SkipError_true);
- loadXmlDir("emotesPatchDir", loadXmlFile);
+ loadXmlDir("emotesPatchDir", loadXmlFile)
loadSpecialXmlFile("graphics/sprites/manaplus_emotes.xml",
SkipError_false);
@@ -106,7 +106,7 @@ void EmoteDB::loadXmlFile(const std::string &fileName,
if (id == -1)
{
reportAlways("Emote Database: Emote with missing ID in %s!",
- paths.getStringValue("emotesFile").c_str());
+ paths.getStringValue("emotesFile").c_str())
continue;
}
EmoteInfo *currentInfo = nullptr;
@@ -179,7 +179,7 @@ void EmoteDB::loadSpecialXmlFile(const std::string &fileName,
if (id == -1)
{
reportAlways("Emote Database: Emote with missing ID in "
- "manaplus_emotes.xml!");
+ "manaplus_emotes.xml!")
continue;
}
const int altId = XML::getProperty(emoteNode, "altid", -1);
@@ -263,7 +263,7 @@ const EmoteInfo *EmoteDB::get(const int id, const bool allowNull)
if (allowNull)
return nullptr;
reportAlways("EmoteDB: Warning, unknown emote ID %d requested",
- id);
+ id)
return &mUnknown;
}
return i->second;
@@ -282,7 +282,7 @@ const EmoteInfo *EmoteDB::get2(int id, const bool allowNull)
if (allowNull)
return nullptr;
reportAlways("EmoteDB: Warning, unknown emote ID %d requested",
- id);
+ id)
return &mUnknown;
}
return i->second;
diff --git a/src/resources/db/groupdb.cpp b/src/resources/db/groupdb.cpp
index ea7ad0853..62db6c684 100644
--- a/src/resources/db/groupdb.cpp
+++ b/src/resources/db/groupdb.cpp
@@ -51,7 +51,7 @@ void GroupDb::load()
loadXmlFile(paths.getStringValue("groupsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("groupsPatchFile"), SkipError_true);
- loadXmlDir("groupsPatchDir", loadXmlFile);
+ loadXmlDir("groupsPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -75,7 +75,7 @@ static ServerCommandTypeT parseCommand(const std::string &str,
{
reportAlways("GroupsDb: unknown command name: '%s' in group id '%d'.",
str.c_str(),
- id);
+ id)
}
return ServerCommandType::Max;
@@ -103,7 +103,7 @@ static ServerPermissionTypeT parsePermission(const std::string &str,
reportAlways("GroupsDb: unknown permission name: "
"'%s' in group id '%d'.",
str.c_str(),
- id);
+ id)
}
return ServerPermissionType::Max;
@@ -137,7 +137,7 @@ static ServerCommandEnable::Type parseUseFlag(const std::string &str,
reportAlways("GroupsDb: unknown use flag: '%s' in group id '%d'."
"Possible values 'self', 'other', 'both'.",
str.c_str(),
- id);
+ id)
return ServerCommandEnable::No;
}
}
@@ -234,7 +234,7 @@ static void parseInherit(XmlNodePtr groupNode,
{
reportAlways("Unknown inherit group id '%d' in group '%d'",
id2,
- id);
+ id)
continue;
}
GroupInfo *const groupInfo2 = (*it2).second;
@@ -271,7 +271,7 @@ void GroupDb::loadXmlFile(const std::string &fileName,
else
{
reportAlways("GroupsDb: Error while loading %s!",
- fileName.c_str());
+ fileName.c_str())
}
return;
}
@@ -292,7 +292,7 @@ void GroupDb::loadXmlFile(const std::string &fileName,
-1);
if (id < 0)
{
- reportAlways("Empty id field in GroupDb");
+ reportAlways("Empty id field in GroupDb")
continue;
}
GroupInfosIter it = mGroups.find(id);
@@ -300,7 +300,7 @@ void GroupDb::loadXmlFile(const std::string &fileName,
if (it != mGroups.end())
{
reportAlways("GroupDb: group with id %d already added",
- id);
+ id)
group = (*it).second;
}
else
@@ -345,7 +345,7 @@ const std::string &GroupDb::getName(const int id)
GroupInfos::const_iterator it = mGroups.find(id);
if (it == mGroups.end())
{
- reportAlways("Unknown group id requested: %d", id);
+ reportAlways("Unknown group id requested: %d", id)
return mEmptyGroup.name;
}
return (*it).second->name;
@@ -356,7 +356,7 @@ const std::string &GroupDb::getLongName(const int id)
GroupInfos::const_iterator it = mGroups.find(id);
if (it == mGroups.end())
{
- reportAlways("Unknown group id requested: %d", id);
+ reportAlways("Unknown group id requested: %d", id)
return mEmptyGroup.longName;
}
return (*it).second->longName;
@@ -367,7 +367,7 @@ bool GroupDb::getShowBadge(const int id)
GroupInfos::const_iterator it = mGroups.find(id);
if (it == mGroups.end())
{
- reportAlways("Unknown group id requested: %d", id);
+ reportAlways("Unknown group id requested: %d", id)
return mEmptyGroup.showBadge;
}
return (*it).second->showBadge;
@@ -378,7 +378,7 @@ bool GroupDb::getHighlightName(const int id)
GroupInfos::const_iterator it = mGroups.find(id);
if (it == mGroups.end())
{
- reportAlways("Unknown group id requested: %d", id);
+ reportAlways("Unknown group id requested: %d", id)
return mEmptyGroup.highlightName;
}
return (*it).second->highlightName;
@@ -389,7 +389,7 @@ const std::string &GroupDb::getBadge(const int id)
GroupInfos::const_iterator it = mGroups.find(id);
if (it == mGroups.end())
{
- reportAlways("Unknown group id requested: %d", id);
+ reportAlways("Unknown group id requested: %d", id)
return mEmptyGroup.badge;
}
return (*it).second->badge;
@@ -400,7 +400,7 @@ const GroupInfo *GroupDb::getGroup(const int id)
GroupInfos::const_iterator it = mGroups.find(id);
if (it == mGroups.end())
{
- reportAlways("Unknown group id requested: %d", id);
+ reportAlways("Unknown group id requested: %d", id)
return &mEmptyGroup;
}
return (*it).second;
diff --git a/src/resources/db/homunculusdb.cpp b/src/resources/db/homunculusdb.cpp
index 0d45a3864..1bbec6815 100644
--- a/src/resources/db/homunculusdb.cpp
+++ b/src/resources/db/homunculusdb.cpp
@@ -47,7 +47,7 @@ void HomunculusDB::load()
logger->log1("Initializing homunculus database...");
loadXmlFile(paths.getStringValue("homunculusesFile"), SkipError_false);
loadXmlFile(paths.getStringValue("homunculusesPatchFile"), SkipError_true);
- loadXmlDir("homunculusesPatchDir", loadXmlFile);
+ loadXmlDir("homunculusesPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -151,7 +151,7 @@ BeingInfo *HomunculusDB::get(const BeingTypeId id)
{
reportAlways("HomunculusDB: Warning, unknown homunculus ID "
"%d requested",
- toInt(id, int));
+ toInt(id, int))
return BeingInfo::unknown;
}
}
diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp
index 56d646eba..f7d2b0173 100644
--- a/src/resources/db/horsedb.cpp
+++ b/src/resources/db/horsedb.cpp
@@ -77,7 +77,7 @@ void HorseDB::load()
loadXmlFile(paths.getStringValue("horsesFile"), SkipError_false);
loadXmlFile(paths.getStringValue("horsesPatchFile"), SkipError_true);
- loadXmlDir("horsesPatchDir", loadXmlFile);
+ loadXmlDir("horsesPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -135,7 +135,7 @@ static void loadRiderOffset(XmlNodePtrConst node,
if (dir == -1)
{
reportAlways("Wrong or missing horse rider direcion: %s",
- dirName.c_str());
+ dirName.c_str())
return;
}
HorseOffset &offset = currentInfo->offsets[dir];
@@ -180,7 +180,7 @@ void HorseDB::loadXmlFile(const std::string &fileName,
if (id == -1)
{
reportAlways("Horse Database: Horse with missing ID in %s!",
- paths.getStringValue("horsesFile").c_str());
+ paths.getStringValue("horsesFile").c_str())
continue;
}
HorseInfo *currentInfo = nullptr;
@@ -214,7 +214,7 @@ static void loadOffset(XmlNodePtrConst node,
if (dir == -1)
{
reportAlways("Wrong or missing horse direcion: %s",
- dirName.c_str());
+ dirName.c_str())
return;
}
HorseOffset &offset = currentInfo->offsets[dir];
@@ -290,7 +290,7 @@ HorseInfo *HorseDB::get(const int id, const bool allowNull)
if (allowNull)
return nullptr;
reportAlways("HorseDB: Warning, unknown horse ID %d requested",
- id);
+ id)
return &mUnknown;
}
return i->second;
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 78ac033a6..5fbc16a79 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -304,7 +304,7 @@ void ItemDB::loadXmlFile(const std::string &fileName,
if (id == 0)
{
reportAlways("ItemDB: Invalid or missing item ID in %s!",
- fileName.c_str());
+ fileName.c_str())
continue;
}
else if (mItemInfos.find(id) != mItemInfos.end())
@@ -403,7 +403,7 @@ void ItemDB::loadXmlFile(const std::string &fileName,
{
reportAlways("Inherit item %d from not existing item %d",
id,
- inherit);
+ inherit)
}
}
@@ -682,7 +682,7 @@ void ItemDB::loadXmlFile(const std::string &fileName,
if (attackRange == 0)
{
reportAlways("ItemDB: Missing attack range from weapon %i!",
- id);
+ id)
}
}
@@ -760,7 +760,7 @@ void ItemDB::unload()
{
logger->log1("Unloading item database...");
- delete2(mUnknown);
+ delete2(mUnknown)
delete_all(mItemInfos);
mItemInfos.clear();
@@ -798,7 +798,7 @@ const ItemInfo &ItemDB::get(const int id)
if (i == mItemInfos.end())
{
- reportAlways("ItemDB: Warning, unknown item ID# %d", id);
+ reportAlways("ItemDB: Warning, unknown item ID# %d", id)
return *mUnknown;
}
@@ -818,7 +818,7 @@ const ItemInfo &ItemDB::get(const std::string &name)
if (!name.empty())
{
reportAlways("ItemDB: Warning, unknown item name \"%s\"",
- name.c_str());
+ name.c_str())
}
return *mUnknown;
}
@@ -1000,7 +1000,7 @@ static void loadSoundRef(ItemInfo *const itemInfo, XmlNodeConstPtr node)
else
{
reportAlways("ItemDB: Ignoring unknown sound event '%s'",
- event.c_str());
+ event.c_str())
}
}
diff --git a/src/resources/db/itemfielddb.cpp b/src/resources/db/itemfielddb.cpp
index 76ad26036..ef289a1b4 100644
--- a/src/resources/db/itemfielddb.cpp
+++ b/src/resources/db/itemfielddb.cpp
@@ -47,7 +47,7 @@ void ItemFieldDb::load()
loadXmlFile(paths.getStringValue("itemFieldsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("itemFieldsPatchFile"), SkipError_true);
- loadXmlDir("itemFieldsPatchDir", loadXmlFile);
+ loadXmlDir("itemFieldsPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -65,7 +65,7 @@ static void loadFields(XmlNodeConstPtr groupNode,
"");
if (name.empty())
{
- reportAlways("Empty name field in ItemFieldDb");
+ reportAlways("Empty name field in ItemFieldDb")
continue;
}
const std::string description = XML::langProperty(node,
@@ -73,7 +73,7 @@ static void loadFields(XmlNodeConstPtr groupNode,
"");
if (description.empty())
{
- reportAlways("Empty description field in ItemFieldDb");
+ reportAlways("Empty description field in ItemFieldDb")
continue;
}
const bool sign = XML::getBoolProperty(node,
@@ -83,14 +83,14 @@ static void loadFields(XmlNodeConstPtr groupNode,
{
reportAlways(
"Same field name detected in requeted and add groups: %s",
- name.c_str());
+ name.c_str())
continue;
}
if (fields1.find(name) != fields1.end())
{
reportAlways(
"Same field name detected: %s",
- name.c_str());
+ name.c_str())
continue;
}
fields1[name] = new ItemFieldType(name,
diff --git a/src/resources/db/itemoptiondb.cpp b/src/resources/db/itemoptiondb.cpp
index e983cd801..e66019a3d 100644
--- a/src/resources/db/itemoptiondb.cpp
+++ b/src/resources/db/itemoptiondb.cpp
@@ -45,7 +45,7 @@ void ItemOptionDb::load()
logger->log1("Initializing item options database...");
loadXmlFile(paths.getStringValue("itemOptionsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("itemOptionsPatchFile"), SkipError_true);
- loadXmlDir("itemOptionsPatchDir", loadXmlFile);
+ loadXmlDir("itemOptionsPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -99,7 +99,7 @@ void ItemOptionDb::loadXmlFile(const std::string &fileName,
else
{
reportAlways("ItemFieldDb: Error while loading %s!",
- fileName.c_str());
+ fileName.c_str())
}
return;
}
@@ -125,7 +125,7 @@ void ItemOptionDb::loadXmlFile(const std::string &fileName,
0);
if (id <= 0)
{
- reportAlways("Empty id field in ItemOptionDb");
+ reportAlways("Empty id field in ItemOptionDb")
continue;
}
STD_VECTOR<ItemFieldType*> &options = mOptions[id];
diff --git a/src/resources/db/languagedb.cpp b/src/resources/db/languagedb.cpp
index 92ae888de..5f162223a 100644
--- a/src/resources/db/languagedb.cpp
+++ b/src/resources/db/languagedb.cpp
@@ -42,7 +42,7 @@ void LanguageDb::load()
logger->log1("Initializing languages database...");
loadXmlFile(paths.getStringValue("languagesFile"), SkipError_false);
loadXmlFile(paths.getStringValue("languagesPatchFile"), SkipError_true);
- loadXmlDir("languagesPatchDir", loadXmlFile);
+ loadXmlDir("languagesPatchDir", loadXmlFile)
}
void LanguageDb::loadXmlFile(const std::string &fileName,
@@ -73,14 +73,14 @@ void LanguageDb::loadXmlFile(const std::string &fileName,
const int id = XML::getProperty(node, "id", -1);
if (id < 0)
{
- reportAlways("Missing lang id");
+ reportAlways("Missing lang id")
continue;
}
const std::string icon = XML::getProperty(node, "icon", "");
const std::string po = XML::getProperty(node, "po", "");
if (icon.empty())
{
- reportAlways("LanguageDb: empty icon field");
+ reportAlways("LanguageDb: empty icon field")
}
else
{
@@ -88,7 +88,7 @@ void LanguageDb::loadXmlFile(const std::string &fileName,
}
if (po.empty())
{
- reportAlways("LanguageDb: empty po field");
+ reportAlways("LanguageDb: empty po field")
}
else
{
diff --git a/src/resources/db/mapdb.cpp b/src/resources/db/mapdb.cpp
index 971fa4578..818c50a9d 100644
--- a/src/resources/db/mapdb.cpp
+++ b/src/resources/db/mapdb.cpp
@@ -53,11 +53,11 @@ void MapDB::load()
SkipError_true);
loadRemapXmlFile(paths.getStringValue("mapsRemapPatchFile"),
SkipError_true);
- loadXmlDir("mapsRemapPatchDir", loadRemapXmlFile);
+ loadXmlDir("mapsRemapPatchDir", loadRemapXmlFile)
loadInfo(paths.getStringValue("mapsFile"), SkipError_false);
loadInfo(paths.getStringValue("mapsPatchFile"), SkipError_true);
- loadXmlDir("mapsPatchDir", loadInfo);
+ loadXmlDir("mapsPatchDir", loadInfo)
mLoaded = true;
}
diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp
index 72e6b3837..97ce1d014 100644
--- a/src/resources/db/mercenarydb.cpp
+++ b/src/resources/db/mercenarydb.cpp
@@ -47,7 +47,7 @@ void MercenaryDB::load()
logger->log1("Initializing mercenary database...");
loadXmlFile(paths.getStringValue("mercenariesFile"), SkipError_false);
loadXmlFile(paths.getStringValue("mercenariesPatchFile"), SkipError_true);
- loadXmlDir("mercenariesPatchDir", loadXmlFile);
+ loadXmlDir("mercenariesPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -149,7 +149,7 @@ BeingInfo *MercenaryDB::get(const BeingTypeId id)
{
reportAlways("MercenaryDB: Warning, unknown mercenary ID "
"%d requested",
- toInt(id, int));
+ toInt(id, int))
return BeingInfo::unknown;
}
}
diff --git a/src/resources/db/moddb.cpp b/src/resources/db/moddb.cpp
index 7e80fc393..b32264df7 100644
--- a/src/resources/db/moddb.cpp
+++ b/src/resources/db/moddb.cpp
@@ -45,7 +45,7 @@ void ModDB::load()
logger->log1("Initializing mod database...");
loadXmlFile(paths.getStringValue("modsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("modsPatchFile"), SkipError_true);
- loadXmlDir("modsPatchDir", loadXmlFile);
+ loadXmlDir("modsPatchDir", loadXmlFile)
mLoaded = true;
}
diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp
index 68bc40703..3141c1cf5 100644
--- a/src/resources/db/monsterdb.cpp
+++ b/src/resources/db/monsterdb.cpp
@@ -51,7 +51,7 @@ void MonsterDB::load()
logger->log1("Initializing monster database...");
loadXmlFile(paths.getStringValue("monstersFile"), SkipError_false);
loadXmlFile(paths.getStringValue("monstersPatchFile"), SkipError_true);
- loadXmlDir("monstersPatchDir", loadXmlFile);
+ loadXmlDir("monstersPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -152,7 +152,7 @@ BeingInfo *MonsterDB::get(const BeingTypeId id)
if (i == mMonsterInfos.end())
{
reportAlways("MonsterDB: Warning, unknown monster ID %d requested",
- toInt(id, int));
+ toInt(id, int))
return BeingInfo::unknown;
}
}
diff --git a/src/resources/db/networkdb.cpp b/src/resources/db/networkdb.cpp
index f44e94d75..3caebbc8a 100644
--- a/src/resources/db/networkdb.cpp
+++ b/src/resources/db/networkdb.cpp
@@ -44,7 +44,7 @@ void NetworkDb::load()
logger->log1("Initializing network database...");
loadXmlFile(paths.getStringValue("networkFile"), SkipError_false);
loadXmlFile(paths.getStringValue("networkPatchFile"), SkipError_true);
- loadXmlDir("networkPatchDir", loadXmlFile);
+ loadXmlDir("networkPatchDir", loadXmlFile)
mLoaded = true;
}
diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp
index 3f858ccc3..a647522d1 100644
--- a/src/resources/db/npcdb.cpp
+++ b/src/resources/db/npcdb.cpp
@@ -53,7 +53,7 @@ void NPCDB::load()
loadXmlFile(paths.getStringValue("npcsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("npcsPatchFile"), SkipError_true);
- loadXmlDir("npcsPatchDir", loadXmlFile);
+ loadXmlDir("npcsPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -92,7 +92,7 @@ void NPCDB::loadXmlFile(const std::string &fileName,
if (id == BeingTypeId_zero)
{
reportAlways("NPC Database: NPC with missing ID in %s!",
- paths.getStringValue("npcsFile").c_str());
+ paths.getStringValue("npcsFile").c_str())
continue;
}
else if (mNPCInfos.find(id) != mNPCInfos.end())
@@ -127,7 +127,7 @@ void NPCDB::loadXmlFile(const std::string &fileName,
{
reportAlways("Not found currency '%s' for npc %d",
currency.c_str(),
- CAST_S32(id));
+ CAST_S32(id))
}
currentInfo->setCurrency(currency);
@@ -191,7 +191,7 @@ BeingInfo *NPCDB::get(const BeingTypeId id)
if (i == mNPCInfos.end())
{
reportAlways("NPCDB: Warning, unknown NPC ID %d requested",
- toInt(id, int));
+ toInt(id, int))
return BeingInfo::unknown;
}
return i->second;
diff --git a/src/resources/db/npcdialogdb.cpp b/src/resources/db/npcdialogdb.cpp
index e2ec324ed..104884904 100644
--- a/src/resources/db/npcdialogdb.cpp
+++ b/src/resources/db/npcdialogdb.cpp
@@ -44,7 +44,7 @@ void NpcDialogDB::load()
logger->log1("Loading npc dialog database...");
loadXmlFile(paths.getStringValue("npcDialogsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("npcDialogsPatchFile"), SkipError_true);
- loadXmlDir("npcDialogsPatchDir", loadXmlFile);
+ loadXmlDir("npcDialogsPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -74,7 +74,7 @@ static void loadNpcDialogMenu(NpcDialogInfo *const dialog,
button->image = XML::getProperty(childNode, "image", "");
if (button->name.empty() && button->image.empty())
{
- reportAlways("Error: npc button without name or image");
+ reportAlways("Error: npc button without name or image")
delete button;
continue;
}
@@ -89,7 +89,7 @@ static void loadNpcDialogMenu(NpcDialogInfo *const dialog,
const std::string image = XML::getProperty(childNode, "image", "");
if (image.empty())
{
- reportAlways("Error: no image attribute found in image tag.");
+ reportAlways("Error: no image attribute found in image tag.")
continue;
}
NpcImageInfo *const imageInfo = new NpcImageInfo;
@@ -105,7 +105,7 @@ static void loadNpcDialogMenu(NpcDialogInfo *const dialog,
const std::string text = XML::getProperty(childNode, "text", "");
if (text.empty())
{
- reportAlways("Error: no text attribute found in text tag.");
+ reportAlways("Error: no text attribute found in text tag.")
continue;
}
NpcTextInfo *const textInfo = new NpcTextInfo;
diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp
index 987f20389..fd61f20f5 100644
--- a/src/resources/db/palettedb.cpp
+++ b/src/resources/db/palettedb.cpp
@@ -60,7 +60,7 @@ void PaletteDB::loadPalette()
}
if (*it != "GIMP Palette")
{
- reportAlways("wrong GIMP palette file");
+ reportAlways("wrong GIMP palette file")
return;
}
++ it;
diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp
index c01e80d42..f1570ed08 100644
--- a/src/resources/db/petdb.cpp
+++ b/src/resources/db/petdb.cpp
@@ -49,7 +49,7 @@ void PETDB::load()
logger->log1("Initializing PET database...");
loadXmlFile(paths.getStringValue("petsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("petsPatchFile"), SkipError_true);
- loadXmlDir("petsPatchDir", loadXmlFile);
+ loadXmlDir("petsPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -88,7 +88,7 @@ void PETDB::loadXmlFile(const std::string &fileName,
if (id == BeingTypeId_negOne)
{
reportAlways("PET Database: PET with missing ID in %s!",
- paths.getStringValue("petsFile").c_str());
+ paths.getStringValue("petsFile").c_str())
continue;
}
@@ -160,7 +160,7 @@ BeingInfo *PETDB::get(const BeingTypeId id)
if (i == mPETInfos.end())
{
reportAlways("PETDB: Warning, unknown PET ID %d requested",
- toInt(id, int));
+ toInt(id, int))
return BeingInfo::unknown;
}
return i->second;
diff --git a/src/resources/db/questdb.cpp b/src/resources/db/questdb.cpp
index 03d9bc31a..65d29f586 100644
--- a/src/resources/db/questdb.cpp
+++ b/src/resources/db/questdb.cpp
@@ -49,7 +49,7 @@ void QuestDb::load()
logger->log1("Initializing quest database...");
loadXmlFile(paths.getStringValue("questsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("questsPatchFile"), SkipError_true);
- loadXmlDir("questsPatchDir", loadXmlFile);
+ loadXmlDir("questsPatchDir", loadXmlFile)
}
static void loadQuest(const int var,
diff --git a/src/resources/db/skillunitdb.cpp b/src/resources/db/skillunitdb.cpp
index db7e3b2ed..130d40683 100644
--- a/src/resources/db/skillunitdb.cpp
+++ b/src/resources/db/skillunitdb.cpp
@@ -49,7 +49,7 @@ void SkillUnitDb::load()
logger->log1("Initializing skill unit database...");
loadXmlFile(paths.getStringValue("skillUnitsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("skillUnitsPatchFile"), SkipError_true);
- loadXmlDir("skillUnitsPatchDir", loadXmlFile);
+ loadXmlDir("skillUnitsPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -87,7 +87,7 @@ void SkillUnitDb::loadXmlFile(const std::string &fileName,
if (id == BeingTypeId_negOne)
{
reportAlways("SkillUnitDb: skill unit with missing ID in %s!",
- paths.getStringValue("skillUnitsFile").c_str());
+ paths.getStringValue("skillUnitsFile").c_str())
continue;
}
@@ -154,7 +154,7 @@ BeingInfo *SkillUnitDb::get(const BeingTypeId id)
{
reportAlways("SkillUnitDb: Warning, unknown skill unit id "
"%d requested",
- toInt(id, int));
+ toInt(id, int))
return BeingInfo::unknown;
}
return i->second;
diff --git a/src/resources/db/sounddb.cpp b/src/resources/db/sounddb.cpp
index 781f8915d..61149eb4e 100644
--- a/src/resources/db/sounddb.cpp
+++ b/src/resources/db/sounddb.cpp
@@ -42,7 +42,7 @@ void SoundDB::load()
logger->log1("Initializing sound database...");
loadXmlFile(paths.getStringValue("soundsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("soundsPatchFile"), SkipError_true);
- loadXmlDir("soundsPatchDir", loadXmlFile);
+ loadXmlDir("soundsPatchDir", loadXmlFile)
}
void SoundDB::loadXmlFile(const std::string &fileName,
diff --git a/src/resources/db/statdb.cpp b/src/resources/db/statdb.cpp
index 2757c0085..88300203f 100644
--- a/src/resources/db/statdb.cpp
+++ b/src/resources/db/statdb.cpp
@@ -92,7 +92,7 @@ void StatDb::load()
loadXmlFile(paths.getStringValue("statFile"), SkipError_false);
loadXmlFile(paths.getStringValue("statPatchFile"), SkipError_true);
- loadXmlDir("statPatchDir", loadXmlFile);
+ loadXmlDir("statPatchDir", loadXmlFile)
mLoaded = true;
}
@@ -112,7 +112,7 @@ static void loadBasicStats(XmlNodeConstPtr rootNode)
{
reportAlways("Wrong attr or id for basic "
"stat with name %s",
- name.c_str());
+ name.c_str())
continue;
}
const std::string tag = XML::getProperty(node, "tag", "");
@@ -150,7 +150,7 @@ static void loadStats(XmlNodeConstPtr rootNode,
{
reportAlways("Wrong attr or id for extended "
"stat with name %s",
- name.c_str());
+ name.c_str())
continue;
}
stats.push_back(BasicStat(static_cast<AttributesT>(id),
@@ -207,7 +207,7 @@ void StatDb::loadXmlFile(const std::string &fileName,
std::string page = XML::langProperty(node, "name", "");
if (page.empty())
{
- reportAlways("Page without name in stats.xml");
+ reportAlways("Page without name in stats.xml")
page = "Unknown";
}
loadStats(node, page);
@@ -218,7 +218,7 @@ void StatDb::loadXmlFile(const std::string &fileName,
if (mBasicStats.empty() &&
mStats.empty())
{
- reportAlways("StatDb: no stats found");
+ reportAlways("StatDb: no stats found")
addDefaultStats();
}
}
diff --git a/src/resources/db/statuseffectdb.cpp b/src/resources/db/statuseffectdb.cpp
index 9bc5e4e95..0eb7c27a6 100644
--- a/src/resources/db/statuseffectdb.cpp
+++ b/src/resources/db/statuseffectdb.cpp
@@ -52,7 +52,7 @@ StatusEffect *StatusEffectDB::getStatusEffect(const int index,
if (it != effects.end())
return (*it).second;
reportAlways("Missing status effect: %d",
- index);
+ index)
return nullptr;
}
@@ -66,7 +66,7 @@ void StatusEffectDB::load()
loadXmlFile(paths.getStringValue("statusEffectsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("statusEffectsPatchFile"),
SkipError_true);
- loadXmlDir("statusEffectsPatchDir", loadXmlFile);
+ loadXmlDir("statusEffectsPatchDir", loadXmlFile)
mLoaded = true;
}
diff --git a/src/resources/db/textdb.cpp b/src/resources/db/textdb.cpp
index b6a902382..7304ac249 100644
--- a/src/resources/db/textdb.cpp
+++ b/src/resources/db/textdb.cpp
@@ -39,7 +39,7 @@ void TextDb::load()
logger->log1("Initializing text database...");
loadXmlFile(paths.getStringValue("textsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("textsPatchFile"), SkipError_true);
- loadXmlDir("textsPatchDir", loadXmlFile);
+ loadXmlDir("textsPatchDir", loadXmlFile)
}
void TextDb::loadXmlFile(const std::string &fileName,
diff --git a/src/resources/db/unitsdb.cpp b/src/resources/db/unitsdb.cpp
index b56be8fec..c9514b640 100644
--- a/src/resources/db/unitsdb.cpp
+++ b/src/resources/db/unitsdb.cpp
@@ -113,7 +113,7 @@ void UnitsDb::load()
loadXmlFile(paths.getStringValue("unitsFile"), SkipError_false);
loadXmlFile(paths.getStringValue("unitsPatchFile"), SkipError_true);
- loadXmlDir("unitsPatchDir", loadXmlFile);
+ loadXmlDir("unitsPatchDir", loadXmlFile)
}
void UnitsDb::unload()
@@ -186,7 +186,7 @@ static void loadCurrencies(XmlNodePtr parentNode)
const std::string name = XML::getProperty(node, "name", "");
if (name.empty())
{
- reportAlways("Error: unknown currency name.");
+ reportAlways("Error: unknown currency name.")
continue;
}
mCurrencies[name] = loadUnit(node);
diff --git a/src/resources/inventory/inventory.cpp b/src/resources/inventory/inventory.cpp
index d013ef3f6..529a1b0b5 100644
--- a/src/resources/inventory/inventory.cpp
+++ b/src/resources/inventory/inventory.cpp
@@ -152,7 +152,7 @@ void Inventory::setItem(const int index,
if (index < 0 || index >= CAST_S32(mSize))
{
reportAlways("Warning: invalid inventory index: %d",
- index);
+ index)
return;
}
@@ -197,7 +197,7 @@ void Inventory::setCards(const int index,
if (index < 0 || index >= CAST_S32(mSize))
{
reportAlways("Warning: invalid inventory index: %d",
- index);
+ index)
return;
}
@@ -212,7 +212,7 @@ void Inventory::setOptions(const int index,
if (index < 0 || index >= CAST_S32(mSize))
{
reportAlways("Warning: invalid inventory index: %d",
- index);
+ index)
return;
}
Item *const item1 = mItems[index];
@@ -226,7 +226,7 @@ void Inventory::setTag(const int index,
if (index < 0 || index >= CAST_S32(mSize))
{
reportAlways("Warning: invalid inventory index: %d",
- index);
+ index)
return;
}
Item *const item1 = mItems[index];
@@ -254,7 +254,7 @@ void Inventory::removeItemAt(const int index)
{
if (mItems[index] == nullptr)
return;
- delete2(mItems[index]);
+ delete2(mItems[index])
mUsed--;
if (mUsed < 0) // Already at 0, no need to distribute event
mUsed = 0;
diff --git a/src/resources/item/item.cpp b/src/resources/item/item.cpp
index fb7290721..ff59fcd19 100644
--- a/src/resources/item/item.cpp
+++ b/src/resources/item/item.cpp
@@ -83,7 +83,7 @@ Item::~Item()
mImage->decRef();
mImage = nullptr;
}
- delete2(mOptions);
+ delete2(mOptions)
dragDrop.clearItem(this);
}
@@ -187,7 +187,7 @@ void Item::addCard(const int card)
void Item::setOptions(const ItemOptionsList *const options)
{
- delete2(mOptions);
+ delete2(mOptions)
mOptions = ItemOptionsList::copy(options);
}
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index a1bd98bdb..1d2f8cfda 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -420,7 +420,7 @@ std::string ItemInfo::getColorName(const ItemColor idx) const
{
reportAlways("Color %d for palette %s not found",
CAST_S32(idx),
- mColorsListName.c_str());
+ mColorsListName.c_str())
return std::string();
}
return it->second.name;
@@ -437,7 +437,7 @@ std::string ItemInfo::getColor(const ItemColor idx) const
{
reportAlways("Color %d for palette %s not found",
CAST_S32(idx),
- mColorsListName.c_str());
+ mColorsListName.c_str())
return std::string();
}
return it->second.color;
@@ -454,7 +454,7 @@ std::string ItemInfo::getIconColorName(const ItemColor idx) const
{
reportAlways("Color %d for palette %s not found",
CAST_S32(idx),
- mColorsListName.c_str());
+ mColorsListName.c_str())
return std::string();
}
return it->second.name;
@@ -471,7 +471,7 @@ std::string ItemInfo::getIconColor(const ItemColor idx) const
{
reportAlways("Color %d for palette %s not found",
CAST_S32(idx),
- mColorsListName.c_str());
+ mColorsListName.c_str())
return std::string();
}
return it->second.color;
diff --git a/src/resources/loaders/atlasloader.cpp b/src/resources/loaders/atlasloader.cpp
index aa2585b27..fd435e57f 100644
--- a/src/resources/loaders/atlasloader.cpp
+++ b/src/resources/loaders/atlasloader.cpp
@@ -47,7 +47,7 @@ struct AtlasLoader final
AtlasResource *const resource = AtlasManager::loadTextureAtlas(
rl->name, *rl->files);
if (resource == nullptr)
- reportAlways("Atlas creation error: %s", rl->name.c_str());
+ reportAlways("Atlas creation error: %s", rl->name.c_str())
return resource;
}
};
diff --git a/src/resources/loaders/emptyatlasloader.cpp b/src/resources/loaders/emptyatlasloader.cpp
index b3d943075..71ea865e9 100644
--- a/src/resources/loaders/emptyatlasloader.cpp
+++ b/src/resources/loaders/emptyatlasloader.cpp
@@ -48,7 +48,7 @@ struct EmptyAtlasLoader final
AtlasResource *const resource = AtlasManager::loadEmptyAtlas(
rl->name, *rl->files);
if (resource == nullptr)
- reportAlways("Empty atlas creation error: %s", rl->name.c_str());
+ reportAlways("Empty atlas creation error: %s", rl->name.c_str())
return resource;
}
};
diff --git a/src/resources/loaders/imageloader.cpp b/src/resources/loaders/imageloader.cpp
index 2c619a4b8..4c573e98d 100644
--- a/src/resources/loaders/imageloader.cpp
+++ b/src/resources/loaders/imageloader.cpp
@@ -67,7 +67,7 @@ namespace
if (rw == nullptr)
{
delete d;
- reportAlways("Image loading error: %s", path1.c_str());
+ reportAlways("Image loading error: %s", path1.c_str())
BLOCK_END("DyedImageLoader::load")
return nullptr;
}
@@ -75,7 +75,7 @@ namespace
: imageHelper->load(rw);
delete d;
if (res == nullptr)
- reportAlways("Image loading error: %s", path1.c_str());
+ reportAlways("Image loading error: %s", path1.c_str())
BLOCK_END("DyedImageLoader::load")
return res;
}
diff --git a/src/resources/loaders/imagesetloader.cpp b/src/resources/loaders/imagesetloader.cpp
index 4fbcc2fc2..d62d3727b 100644
--- a/src/resources/loaders/imagesetloader.cpp
+++ b/src/resources/loaders/imagesetloader.cpp
@@ -53,7 +53,7 @@ struct ImageSetLoader final
Image *const img = Loader::getImage(rl->path);
if (img == nullptr)
{
- reportAlways("Image loading error: %s", rl->path.c_str());
+ reportAlways("Image loading error: %s", rl->path.c_str())
return nullptr;
}
ImageSet *const res = new ImageSet(img, rl->w, rl->h, 0, 0);
diff --git a/src/resources/loaders/musicloader.cpp b/src/resources/loaders/musicloader.cpp
index 6bd906490..97b5ceb73 100644
--- a/src/resources/loaders/musicloader.cpp
+++ b/src/resources/loaders/musicloader.cpp
@@ -51,7 +51,7 @@ namespace
if (rw == nullptr)
{
reportAlways("Error loading resource: %s",
- rl->path.c_str());
+ rl->path.c_str())
return nullptr;
}
if (Mix_Music *const music = SDL::LoadMUSOgg_RW(rw))
diff --git a/src/resources/loaders/rescaledloader.cpp b/src/resources/loaders/rescaledloader.cpp
index 085614870..8f872943b 100644
--- a/src/resources/loaders/rescaledloader.cpp
+++ b/src/resources/loaders/rescaledloader.cpp
@@ -53,7 +53,7 @@ namespace
if (rescaled == nullptr)
{
reportAlways("Rescale image failed: %s",
- rl->image->mIdPath.c_str());
+ rl->image->mIdPath.c_str())
return nullptr;
}
return rescaled;
diff --git a/src/resources/loaders/shaderloader.cpp b/src/resources/loaders/shaderloader.cpp
index 5f1edd3a7..ca3cd6a13 100644
--- a/src/resources/loaders/shaderloader.cpp
+++ b/src/resources/loaders/shaderloader.cpp
@@ -51,7 +51,7 @@ namespace
= static_cast<const ShaderLoader *>(v);
Shader *const resource = shaders.createShader(rl->type, rl->name);
if (resource == nullptr)
- reportAlways("Shader creation error: %s", rl->name.c_str());
+ reportAlways("Shader creation error: %s", rl->name.c_str())
return resource;
}
};
diff --git a/src/resources/loaders/shaderprogramloader.cpp b/src/resources/loaders/shaderprogramloader.cpp
index d0c6f1f41..2f981f590 100644
--- a/src/resources/loaders/shaderprogramloader.cpp
+++ b/src/resources/loaders/shaderprogramloader.cpp
@@ -55,7 +55,7 @@ namespace
rl->fragment,
rl->isNewShader);
if (resource == nullptr)
- reportAlways("Shader program creation error");
+ reportAlways("Shader program creation error")
return resource;
}
};
diff --git a/src/resources/loaders/soundloader.cpp b/src/resources/loaders/soundloader.cpp
index 96c90d4b4..f8550f631 100644
--- a/src/resources/loaders/soundloader.cpp
+++ b/src/resources/loaders/soundloader.cpp
@@ -50,7 +50,7 @@ namespace
if (rw == nullptr)
{
reportAlways("Error loading resource: %s",
- rl->path.c_str());
+ rl->path.c_str())
return nullptr;
}
// Load the music data and free the RWops structure
@@ -61,7 +61,7 @@ namespace
return new SoundEffect(tmpSoundEffect, rl->path);
}
reportAlways("Error, failed to load sound effect: %s",
- SDL_GetError());
+ SDL_GetError())
return nullptr;
}
};
diff --git a/src/resources/loaders/subimageloader.cpp b/src/resources/loaders/subimageloader.cpp
index 3b8672821..6abba11c9 100644
--- a/src/resources/loaders/subimageloader.cpp
+++ b/src/resources/loaders/subimageloader.cpp
@@ -57,7 +57,7 @@ namespace
if (res == nullptr)
{
reportAlways("SubImage loading error: %s",
- rl->parent->mSource.c_str());
+ rl->parent->mSource.c_str())
}
return res;
}
diff --git a/src/resources/loaders/walklayerloader.cpp b/src/resources/loaders/walklayerloader.cpp
index 3fcff35c2..c4bd99c44 100644
--- a/src/resources/loaders/walklayerloader.cpp
+++ b/src/resources/loaders/walklayerloader.cpp
@@ -49,7 +49,7 @@ struct WalkLayerLoader final
WalkLayerLoader *>(v);
Resource *const resource = NavigationManager::loadWalkLayer(rl->map);
if (resource == nullptr)
- reportAlways("WalkLayer creation error");
+ reportAlways("WalkLayer creation error")
return resource;
}
};
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index bcec1a4a3..3cc6ecafe 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -191,9 +191,9 @@ Map::~Map()
delete_all(mForegrounds);
delete_all(mBackgrounds);
delete_all(mTileAnimations);
- delete2(mSpecialLayer);
- delete2(mTempLayer);
- delete2(mObjects);
+ delete2(mSpecialLayer)
+ delete2(mTempLayer)
+ delete2(mObjects)
delete_all(mMapPortals);
#ifdef USE_OPENGL
if (mAtlas != nullptr)
@@ -202,7 +202,7 @@ Map::~Map()
mAtlas = nullptr;
}
#endif // USE_OPENGL
- delete2(mHeights);
+ delete2(mHeights)
delete [] mMetaTiles;
}
@@ -601,12 +601,12 @@ void Map::drawCollision(Graphics *restrict const graphics,
int width = 0;
const int x0 = x;
- fillCollision(BlockMask::WALL, COLLISION_HIGHLIGHT);
- fillCollision(BlockMask::AIR, AIR_COLLISION_HIGHLIGHT);
- fillCollision(BlockMask::WATER, WATER_COLLISION_HIGHLIGHT);
- fillCollision(BlockMask::GROUNDTOP, GROUNDTOP_COLLISION_HIGHLIGHT);
- fillCollision(BlockMask::PLAYERWALL, COLLISION_HIGHLIGHT);
- fillCollision(BlockMask::MONSTERWALL, MONSTER_COLLISION_HIGHLIGHT);
+ fillCollision(BlockMask::WALL, COLLISION_HIGHLIGHT)
+ fillCollision(BlockMask::AIR, AIR_COLLISION_HIGHLIGHT)
+ fillCollision(BlockMask::WATER, WATER_COLLISION_HIGHLIGHT)
+ fillCollision(BlockMask::GROUNDTOP, GROUNDTOP_COLLISION_HIGHLIGHT)
+ fillCollision(BlockMask::PLAYERWALL, COLLISION_HIGHLIGHT)
+ fillCollision(BlockMask::MONSTERWALL, MONSTER_COLLISION_HIGHLIGHT)
}
}
}
@@ -1241,7 +1241,7 @@ void Map::saveExtraLayer() const restrict2
if (!mapFile.is_open())
{
reportAlways("Error opening file for writing: %s",
- mapFileName.c_str());
+ mapFileName.c_str())
return;
}
diff --git a/src/resources/map/tileanimation.cpp b/src/resources/map/tileanimation.cpp
index f31fed7ae..6f6ee9e3e 100644
--- a/src/resources/map/tileanimation.cpp
+++ b/src/resources/map/tileanimation.cpp
@@ -40,7 +40,7 @@ TileAnimation::TileAnimation(Animation *const ani) :
TileAnimation::~TileAnimation()
{
- delete2(mAnimation);
+ delete2(mAnimation)
}
bool TileAnimation::update(const int ticks)
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 74059a034..eac985d02 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -203,19 +203,19 @@ int inflateMemory(unsigned char *restrict const in,
{
if (ret == Z_MEM_ERROR)
{
- reportAlways("Error: Out of memory while decompressing map data!");
+ reportAlways("Error: Out of memory while decompressing map data!")
}
else if (ret == Z_VERSION_ERROR)
{
- reportAlways("Error: Incompatible zlib version!");
+ reportAlways("Error: Incompatible zlib version!")
}
else if (ret == Z_DATA_ERROR)
{
- reportAlways("Error: Incorrect zlib compressed data!");
+ reportAlways("Error: Incorrect zlib compressed data!")
}
else
{
- reportAlways("Error: Unknown error while decompressing map data!");
+ reportAlways("Error: Unknown error while decompressing map data!")
}
free(out);
@@ -284,7 +284,7 @@ Map *MapReader::readMap(const std::string &restrict filename,
else
{
reportAlways("Error while parsing map file (%s)!",
- realFilename.c_str());
+ realFilename.c_str())
}
if (map != nullptr)
@@ -306,7 +306,7 @@ Map *MapReader::readMap(const std::string &restrict filename,
void MapReader::loadLayers(const std::string &path)
{
BLOCK_START("MapReader::loadLayers")
- loadXmlDir2(path, addLayerToList, ".tmx", SkipError_false);
+ loadXmlDir2(path, addLayerToList, ".tmx", SkipError_false)
BLOCK_END("MapReader::loadLayers")
}
@@ -348,7 +348,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
{
reportAlways("MapReader: Warning: "
"Uninitialized tile width or height value for map: %s",
- path.c_str());
+ path.c_str())
BLOCK_END("MapReader::readMap xml")
return nullptr;
}
@@ -377,7 +377,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path)
else
{
reportAlways("Missing atlas for map: %s",
- fileName.c_str());
+ fileName.c_str())
}
}
BLOCK_END("MapReader::readMap load atlas")
@@ -674,7 +674,7 @@ bool MapReader::readBase64Layer(XmlNodeConstPtrConst childNode,
&& compression != "zlib")
{
reportAlways("Warning: only gzip and zlib layer"
- " compression supported!");
+ " compression supported!")
return false;
}
@@ -730,7 +730,7 @@ bool MapReader::readBase64Layer(XmlNodeConstPtrConst childNode,
if (inflated == nullptr)
{
- reportAlways("Error: Could not decompress layer!");
+ reportAlways("Error: Could not decompress layer!")
return false;
}
}
@@ -1143,14 +1143,14 @@ Tileset *MapReader::readTileset(XmlNodePtr node,
graphicsManager.getUseAtlases())
{
reportAlways("Error: image '%s' not present in atlas",
- source.c_str());
+ source.c_str())
}
#endif // USE_OPENGL
}
else
{
reportAlways("Error: Failed to load tileset (%s)",
- source.c_str());
+ source.c_str())
}
}
}
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index a2aa72958..ff3a2e4f3 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -69,7 +69,7 @@ Image *OpenGLImageHelper::load(SDL_RWops *const rw, Dye const &dye)
SDL_Surface *const tmpImage = loadPng(rw);
if (tmpImage == nullptr)
{
- reportAlways("Error, image load failed: %s", SDL_GetError());
+ reportAlways("Error, image load failed: %s", SDL_GetError())
return nullptr;
}
@@ -148,7 +148,7 @@ SDL_Surface *OpenGLImageHelper::convertSurfaceNormalize(SDL_Surface *tmpImage,
if (realWidth < width || realHeight < height)
{
reportAlways("Warning: image too large, cropping to %dx%d texture!",
- tmpImage->w, tmpImage->h);
+ tmpImage->w, tmpImage->h)
}
#ifdef USE_SDL2
@@ -190,7 +190,7 @@ SDL_Surface *OpenGLImageHelper::convertSurfaceNormalize(SDL_Surface *tmpImage,
if (tmpImage == nullptr)
{
- reportAlways("Error, image convert failed: out of memory");
+ reportAlways("Error, image convert failed: out of memory")
return nullptr;
}
SDL_BlitSurface(oldImage, nullptr, tmpImage, nullptr);
@@ -242,7 +242,7 @@ SDL_Surface *OpenGLImageHelper::convertSurface(SDL_Surface *tmpImage,
if (tmpImage == nullptr)
{
- reportAlways("Error, image convert failed: out of memory");
+ reportAlways("Error, image convert failed: out of memory")
return nullptr;
}
SDL_BlitSurface(oldImage, nullptr, tmpImage, nullptr);
@@ -298,7 +298,7 @@ void OpenGLImageHelper::bindTexture(const GLuint texture)
case RENDER_NULL:
case RENDER_LAST:
default:
- reportAlways("Unknown OpenGL backend: %d", mUseOpenGL);
+ reportAlways("Unknown OpenGL backend: %d", mUseOpenGL)
break;
}
}
@@ -416,7 +416,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage,
{
std::string errmsg = GraphicsManager::errorToString(error);
reportAlways("Error: Image GL import failed: %s (%u)",
- errmsg.c_str(), error);
+ errmsg.c_str(), error)
// return nullptr;
}
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp
index 0a28ac83a..db175ea20 100644
--- a/src/resources/resourcemanager/resourcemanager.cpp
+++ b/src/resources/resourcemanager/resourcemanager.cpp
@@ -96,7 +96,7 @@ void deleteResourceManager()
#ifdef UNITTESTS
if (status)
- reportAlways("Found leaked resources.");
+ reportAlways("Found leaked resources.")
#endif // UNITTESTS
iter = mResources.begin();
@@ -447,7 +447,7 @@ Resource *get(const std::string &idPath,
}
else
{
- reportAlways("Error loading image: %s", idPath.c_str());
+ reportAlways("Error loading image: %s", idPath.c_str())
}
#else // DISABLE_RESOURCE_CACHING
@@ -464,7 +464,7 @@ Resource *get(const std::string &idPath,
}
else
{
- reportAlways("Error loading image: " + idPath);
+ reportAlways("Error loading image: " + idPath)
}
#endif // DISABLE_RESOURCE_CACHING
@@ -493,7 +493,7 @@ void release(Resource *const res)
{
// +++ need reenable after Resource will have type field
// reportAlways("no resource in cache: %s",
-// res->mIdPath.c_str());
+// res->mIdPath.c_str())
delete res;
return;
}
@@ -501,7 +501,7 @@ void release(Resource *const res)
{
// +++ need reenable after Resource will have type field
// reportAlways("in cache other image: %s",
-// res->mIdPath.c_str());
+// res->mIdPath.c_str())
delete res;
return;
}
@@ -619,7 +619,7 @@ void deleteInstance()
}
#ifdef UNITTESTS
if (status)
- reportAlways("Found leaked resources.");
+ reportAlways("Found leaked resources.")
#endif // UNITTESTS
#endif // DUMP_LEAKED_RESOURCES
diff --git a/src/resources/sdl2imagehelper.cpp b/src/resources/sdl2imagehelper.cpp
index 0875a341f..3340032b7 100644
--- a/src/resources/sdl2imagehelper.cpp
+++ b/src/resources/sdl2imagehelper.cpp
@@ -71,7 +71,7 @@ Image *SDLImageHelper::_SDLload(SDL_Surface *tmpImage)
if (!texture)
{
reportAlways("Texture from surface creation failed: %s",
- SDL_GetError());
+ SDL_GetError())
return nullptr;
}
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
diff --git a/src/resources/sdlgfxblitfunc.cpp b/src/resources/sdlgfxblitfunc.cpp
index d72e7fbc5..fa74c82c3 100644
--- a/src/resources/sdlgfxblitfunc.cpp
+++ b/src/resources/sdlgfxblitfunc.cpp
@@ -383,7 +383,7 @@ static void _SDL_gfxBlitBlitterRGBA(const SDL_gfxBlitInfo *const info)
src += 4;
dst += 4;
- }, width);
+ }, width)
src += srcskip;
dst += dstskip;
}
@@ -451,7 +451,7 @@ int SDLgfxBlitRGBA(SDL_Surface *const src,
if (src == nullptr ||
dst == nullptr)
{
- reportAlways("SDLgfxBlitRGBA: passed a NULL surface");
+ reportAlways("SDLgfxBlitRGBA: passed a NULL surface")
return -1;
}
diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp
index 2c5970a49..0ed5c9f52 100644
--- a/src/resources/sdlimagehelper.cpp
+++ b/src/resources/sdlimagehelper.cpp
@@ -57,7 +57,7 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye)
if (tmpImage == nullptr)
{
reportAlways("Error, image load failed: %s",
- SDL_GetError());
+ SDL_GetError())
return nullptr;
}
@@ -196,7 +196,7 @@ Image *SDLImageHelper::createTextSurface(SDL_Surface *const tmpImage,
if (image == nullptr)
{
- reportAlways("Error: Image convert failed.");
+ reportAlways("Error: Image convert failed.")
delete [] alphaChannel;
return nullptr;
}
@@ -224,7 +224,7 @@ Image *SDLImageHelper::_SDLload(SDL_Surface *tmpImage)
if (tmpImage->format->BitsPerPixel != 32)
{
- reportAlways("Non 32 bit image detected");
+ reportAlways("Non 32 bit image detected")
tmpImage = convertTo32Bit(tmpImage);
if (tmpImage == nullptr)
@@ -296,7 +296,7 @@ Image *SDLImageHelper::_SDLload(SDL_Surface *tmpImage)
if (image == nullptr)
{
- reportAlways("Error: Image convert failed.");
+ reportAlways("Error: Image convert failed.")
delete [] alphaChannel;
return nullptr;
}
diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp
index 965cffbec..9e6e2e327 100644
--- a/src/resources/sprite/animatedsprite.cpp
+++ b/src/resources/sprite/animatedsprite.cpp
@@ -134,7 +134,7 @@ AnimatedSprite::~AnimatedSprite()
{
mDelayLoad->clearSprite();
DelayedManager::removeDelayLoad(mDelayLoad);
- delete2(mDelayLoad);
+ delete2(mDelayLoad)
}
}
diff --git a/src/resources/sprite/spritedef.cpp b/src/resources/sprite/spritedef.cpp
index b2a53fd93..1e38c4ca5 100644
--- a/src/resources/sprite/spritedef.cpp
+++ b/src/resources/sprite/spritedef.cpp
@@ -105,7 +105,7 @@ SpriteDef *SpriteDef::load(const std::string &animationFile,
if ((rootNode == nullptr) || !xmlNameEqual(rootNode, "sprite"))
{
reportAlways("Error, failed to parse sprite %s",
- animationFile.c_str());
+ animationFile.c_str())
const std::string errorFile = pathJoin(paths.getStringValue("sprites"),
paths.getStringValue("spriteErrorFile"));
BLOCK_END("SpriteDef::load")
@@ -256,7 +256,7 @@ void SpriteDef::loadImageSet(XmlNodeConstPtr node,
{
reportAlways("%s: Couldn't load imageset: %s",
mSource.c_str(),
- imageSrc.c_str());
+ imageSrc.c_str())
return;
}
@@ -273,7 +273,7 @@ const ImageSet *SpriteDef::getImageSet(const std::string &imageSetName) const
reportAlways("%s: Imageset \"%s\" not defined in %s",
mSource.c_str(),
imageSetName.c_str(),
- mIdPath.c_str());
+ mIdPath.c_str())
return nullptr;
}
return si->second;
@@ -295,7 +295,7 @@ void SpriteDef::loadAction(XmlNodeConstPtr node,
reportAlways("%s: Unknown action \"%s\" defined in %s",
mSource.c_str(),
actionName.c_str(),
- mIdPath.c_str());
+ mIdPath.c_str())
return;
}
Action *const action = new Action(actionName);
@@ -305,7 +305,7 @@ void SpriteDef::loadAction(XmlNodeConstPtr node,
// dirty hack to fix bad resources in tmw server
if (actionName == "attack_stab")
{
- reportAlways("Found legacy attribute attack_stab in animation");
+ reportAlways("Found legacy attribute attack_stab in animation")
addAction(hp, "attack", action);
}
@@ -345,7 +345,7 @@ void SpriteDef::loadAnimation(XmlNodeConstPtr animationNode,
reportAlways("%s: Unknown direction \"%s\" used in %s",
mSource.c_str(),
directionName.c_str(),
- mIdPath.c_str());
+ mIdPath.c_str())
return;
}
@@ -383,7 +383,7 @@ void SpriteDef::loadAnimation(XmlNodeConstPtr animationNode,
reportAlways(
"%s: No valid value for 'index' at direction '%s'",
mSource.c_str(),
- directionName.c_str());
+ directionName.c_str())
continue;
}
@@ -393,7 +393,7 @@ void SpriteDef::loadAnimation(XmlNodeConstPtr animationNode,
reportAlways("%s: No image at index %d at direction '%s'",
mSource.c_str(),
index + variant_offset,
- directionName.c_str());
+ directionName.c_str())
continue;
}
@@ -411,7 +411,7 @@ void SpriteDef::loadAnimation(XmlNodeConstPtr animationNode,
{
reportAlways("%s: No valid value for 'repeat' at direction %s",
mSource.c_str(),
- directionName.c_str());
+ directionName.c_str())
continue;
}
@@ -495,7 +495,7 @@ void SpriteDef::includeSprite(XmlNodeConstPtr includeNode, const int variant)
{
reportAlways("%s: Tried to include %s which already is included.",
mSource.c_str(),
- filename.c_str());
+ filename.c_str())
return;
}
mProcessedFiles.insert(filename);
@@ -511,7 +511,7 @@ void SpriteDef::includeSprite(XmlNodeConstPtr includeNode, const int variant)
{
reportAlways("%s: No sprite root node in %s",
mSource.c_str(),
- filename.c_str());
+ filename.c_str())
doc->decRef();
return;
}
@@ -599,7 +599,7 @@ bool SpriteDef::addSequence(const int start,
if (start < 0 || end < 0)
{
reportAlways("%s: No valid value for 'start' or 'end'",
- mSource.c_str());
+ mSource.c_str())
return true;
}
@@ -616,7 +616,7 @@ bool SpriteDef::addSequence(const int start,
{
reportAlways("%s: No image at index %d",
mSource.c_str(),
- pos + variant_offset);
+ pos + variant_offset)
pos ++;
continue;
}
@@ -641,7 +641,7 @@ bool SpriteDef::addSequence(const int start,
{
reportAlways("%s: No image at index %d",
mSource.c_str(),
- pos + variant_offset);
+ pos + variant_offset)
pos ++;
continue;
}
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index 358b8e17c..2922bf66f 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -264,7 +264,7 @@ void SoundManager::info()
uint16_t audioFormat = 0;
int channels = 0;
- MIX_VERSION(&compiledVersion);
+ MIX_VERSION(&compiledVersion)
const SDL_version *const linkedVersion = Mix_Linked_Version();
#ifdef USE_SDL2
@@ -342,7 +342,7 @@ static SDLMusic *loadMusic(const std::string &fileName,
if (!VirtFs::exists(path))
{
if (skipError == SkipError_false)
- reportAlways("Music file not found: %s", fileName.c_str());
+ reportAlways("Music file not found: %s", fileName.c_str())
return nullptr;
}
return Loader::getMusic(path);
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp
index 34fe739a5..dcf7770fe 100644
--- a/src/spellmanager.cpp
+++ b/src/spellmanager.cpp
@@ -324,7 +324,7 @@ void SpellManager::load()
if (!var##method.empty()) \
serverConfig.setValue((str) + toString(i), var##method); \
else \
- serverConfig.deleteKey((str) + toString(i));
+ serverConfig.deleteKey((str) + toString(i))
void SpellManager::save() const
{
diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp
index 43c2c3f62..db9373e84 100644
--- a/src/test/testmain.cpp
+++ b/src/test/testmain.cpp
@@ -48,7 +48,7 @@ TestMain::TestMain() :
TestMain::~TestMain()
{
- delete2(log);
+ delete2(log)
}
void TestMain::initConfig()
diff --git a/src/text.cpp b/src/text.cpp
index 88f56b325..d1ee14287 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -114,7 +114,7 @@ Text::~Text()
textManager->removeText(this);
if (--mInstances == 0)
{
- delete2(textManager);
+ delete2(textManager)
for (int f = 0; f < 9; f ++)
{
if (mBubble.grid[f] != nullptr)
diff --git a/src/unittests/gui/widgets/browserbox.cc b/src/unittests/gui/widgets/browserbox.cc
index 2c0071313..a5e07a3ec 100644
--- a/src/unittests/gui/widgets/browserbox.cc
+++ b/src/unittests/gui/widgets/browserbox.cc
@@ -185,7 +185,7 @@ TEST_CASE("BrowserBox tests", "browserbox")
delete Widget::getGloablFont();
Widget::setGlobalFont(nullptr);
delete box;
- delete2(client);
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
}
diff --git a/src/unittests/gui/widgets/staticbrowserbox.cc b/src/unittests/gui/widgets/staticbrowserbox.cc
index 1dad81d84..41d4aab72 100644
--- a/src/unittests/gui/widgets/staticbrowserbox.cc
+++ b/src/unittests/gui/widgets/staticbrowserbox.cc
@@ -185,7 +185,7 @@ TEST_CASE("StaticBrowserBox tests", "browserbox")
delete Widget::getGloablFont();
Widget::setGlobalFont(nullptr);
delete box;
- delete2(client);
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
}
diff --git a/src/unittests/gui/windowmanager.cc b/src/unittests/gui/windowmanager.cc
index dbe7338a4..fa27e5dfd 100644
--- a/src/unittests/gui/windowmanager.cc
+++ b/src/unittests/gui/windowmanager.cc
@@ -218,7 +218,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV0(bankWindow, BankWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(bankWindow);
+ delete2(bankWindow)
}
SECTION("buyDialog1")
{
@@ -226,7 +226,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV0(dialog, BuyDialog);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("buyDialog2")
{
@@ -236,7 +236,7 @@ TEST_CASE("Windows tests", "windowmanager")
DEFAULT_CURRENCY);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
#ifdef TMWA_SUPPORT
SECTION("buyDialog3")
@@ -247,7 +247,7 @@ TEST_CASE("Windows tests", "windowmanager")
DEFAULT_CURRENCY);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
#endif // TMWA_SUPPORT
SECTION("buyDialog4")
@@ -266,9 +266,9 @@ TEST_CASE("Windows tests", "windowmanager")
DEFAULT_CURRENCY);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
- delete2(being);
- delete2(map);
+ delete2(dialog)
+ delete2(being)
+ delete2(map)
}
SECTION("BuyingStoreSellDialog")
{
@@ -277,7 +277,7 @@ TEST_CASE("Windows tests", "windowmanager")
BeingId_zero, 0);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("BuySellDialog1")
{
@@ -285,7 +285,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV(dialog, BuySellDialog, BeingId_zero);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("BuySellDialog2")
{
@@ -293,7 +293,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV(dialog, BuySellDialog, "user");
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("ChangeEmailDialog")
{
@@ -302,7 +302,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV(dialog, ChangeEmailDialog, data);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("ChangePasswordDialog")
{
@@ -311,7 +311,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV(dialog, ChangePasswordDialog, data);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("CharSelectDialog")
{
@@ -320,7 +320,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV(dialog, CharSelectDialog, data);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("CharCreateDialog")
{
@@ -332,8 +332,8 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV(dialog, CharCreateDialog, dialog2, 0);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
- delete2(dialog2);
+ delete2(dialog)
+ delete2(dialog2)
*/
}
SECTION("ChatWindow")
@@ -342,14 +342,14 @@ TEST_CASE("Windows tests", "windowmanager")
"Chat");
gui->draw();
mainGraphics->updateScreen();
- delete2(chatWindow);
+ delete2(chatWindow)
}
SECTION("ClanWindow")
{
CREATEWIDGETV0(clanWindow, ClanWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(clanWindow);
+ delete2(clanWindow)
}
SECTION("ConfirmDialog")
{
@@ -358,14 +358,14 @@ TEST_CASE("Windows tests", "windowmanager")
"", "", SOUND_REQUEST, false, Modal_false, nullptr);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("CutinWindow")
{
CREATEWIDGETV0(cutInWindow, CutInWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(cutInWindow);
+ delete2(cutInWindow)
}
SECTION("DebugWindow")
{
@@ -373,14 +373,14 @@ TEST_CASE("Windows tests", "windowmanager")
"Debug");
gui->draw();
mainGraphics->updateScreen();
- delete2(debugWindow);
+ delete2(debugWindow)
}
SECTION("didYouKnowWindow")
{
CREATEWIDGETV0(didYouKnowWindow, DidYouKnowWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(didYouKnowWindow);
+ delete2(didYouKnowWindow)
}
SECTION("EditDialog")
{
@@ -389,7 +389,7 @@ TEST_CASE("Windows tests", "windowmanager")
"", "", "", 100, nullptr, Modal_false);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("EditServerDialog")
{
@@ -402,22 +402,22 @@ TEST_CASE("Windows tests", "windowmanager")
serverDialog, mCurrentServer, 0);
gui->draw();
mainGraphics->updateScreen();
- delete2(editServerDialog);
- delete2(serverDialog);
+ delete2(editServerDialog)
+ delete2(serverDialog)
}
SECTION("EggSelectionDialog")
{
EggSelectionDialog *dialog = CREATEWIDGETR0(EggSelectionDialog);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("EmoteWindow")
{
EmoteWindow *dialog = CREATEWIDGETR0(EmoteWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("EquipmentWindow")
{
@@ -431,17 +431,17 @@ TEST_CASE("Windows tests", "windowmanager")
equipment, being, false);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
- delete2(being);
- delete2(map);
- delete2(equipment);
+ delete2(dialog)
+ delete2(being)
+ delete2(map)
+ delete2(equipment)
}
SECTION("helpWindow")
{
CREATEWIDGETV0(helpWindow, HelpWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(helpWindow);
+ delete2(helpWindow)
}
SECTION("InsertCardDialog")
{
@@ -459,8 +459,8 @@ TEST_CASE("Windows tests", "windowmanager")
0, item);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
- delete2(item);
+ delete2(dialog)
+ delete2(item)
}
SECTION("InventoryWindow")
{
@@ -469,8 +469,8 @@ TEST_CASE("Windows tests", "windowmanager")
inventory);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
- delete2(inventory);
+ delete2(dialog)
+ delete2(inventory)
}
SECTION("ItemAmountWindow")
{
@@ -491,15 +491,15 @@ TEST_CASE("Windows tests", "windowmanager")
0);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
- delete2(item);
+ delete2(dialog)
+ delete2(item)
}
SECTION("KillStats")
{
CREATEWIDGETV0(killStats, KillStats);
gui->draw();
mainGraphics->updateScreen();
- delete2(killStats);
+ delete2(killStats)
}
SECTION("loginDialog")
{
@@ -510,14 +510,14 @@ TEST_CASE("Windows tests", "windowmanager")
&settings.options.updateHost);
gui->draw();
mainGraphics->updateScreen();
- delete2(loginDialog);
+ delete2(loginDialog)
}
SECTION("MailEditWindow")
{
CREATEWIDGETV0(mailEditWindow, MailEditWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(mailEditWindow);
+ delete2(mailEditWindow)
}
SECTION("MailViewWindow")
{
@@ -527,7 +527,7 @@ TEST_CASE("Windows tests", "windowmanager")
1);
gui->draw();
mainGraphics->updateScreen();
- delete2(mailViewWindow);
+ delete2(mailViewWindow)
delete message;
}
SECTION("MailWindow")
@@ -535,35 +535,35 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV0(mailWindow, MailWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(mailWindow);
+ delete2(mailWindow)
}
SECTION("Minimap")
{
CREATEWIDGETV0(minimap, Minimap);
gui->draw();
mainGraphics->updateScreen();
- delete2(minimap);
+ delete2(minimap)
}
SECTION("MiniStatusWindow")
{
CREATEWIDGETV0(miniStatusWindow, MiniStatusWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(miniStatusWindow);
+ delete2(miniStatusWindow)
}
SECTION("NpcDialog")
{
NpcDialog *dialog = CREATEWIDGETR(NpcDialog, BeingId_zero);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("NpcSellDialog")
{
NpcSellDialog *dialog = CREATEWIDGETR(NpcSellDialog, BeingId_zero);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("OkDialog")
{
@@ -572,21 +572,21 @@ TEST_CASE("Windows tests", "windowmanager")
ShowCenter_true, nullptr, 100);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("OutfitWindow")
{
CREATEWIDGETV0(outfitWindow, OutfitWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(outfitWindow);
+ delete2(outfitWindow)
}
SECTION("QuestsWindow")
{
CREATEWIDGETV0(questsWindow, QuestsWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(questsWindow);
+ delete2(questsWindow)
}
SECTION("QuitDialog")
{
@@ -594,7 +594,7 @@ TEST_CASE("Windows tests", "windowmanager")
&quitDialog);
gui->draw();
mainGraphics->updateScreen();
- delete2(quitDialog);
+ delete2(quitDialog)
}
SECTION("RegisterDialog")
{
@@ -602,7 +602,7 @@ TEST_CASE("Windows tests", "windowmanager")
loginData);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("serversDialog")
{
@@ -613,7 +613,7 @@ TEST_CASE("Windows tests", "windowmanager")
settings.configDir);
gui->draw();
mainGraphics->updateScreen();
- delete2(serverDialog);
+ delete2(serverDialog)
}
SECTION("serversInfoWindow")
{
@@ -622,14 +622,14 @@ TEST_CASE("Windows tests", "windowmanager")
mCurrentServer);
gui->draw();
mainGraphics->updateScreen();
- delete2(serverInfoWindow);
+ delete2(serverInfoWindow)
}
SECTION("setupWindow")
{
CREATEWIDGETV0(setupWindow, SetupWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(setupWindow);
+ delete2(setupWindow)
}
SECTION("ShopSellDialog")
{
@@ -640,7 +640,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV0(shopWindow, ShopWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(shopWindow);
+ delete2(shopWindow)
}
SECTION("ShortcutWindow1")
{
@@ -654,7 +654,7 @@ TEST_CASE("Windows tests", "windowmanager")
0);
gui->draw();
mainGraphics->updateScreen();
- delete2(itemShortcutWindow);
+ delete2(itemShortcutWindow)
}
SECTION("ShortcutWindow2")
{
@@ -665,21 +665,21 @@ TEST_CASE("Windows tests", "windowmanager")
0);
gui->draw();
mainGraphics->updateScreen();
- delete2(itemShortcutWindow);
+ delete2(itemShortcutWindow)
}
SECTION("SkillDialog")
{
CREATEWIDGETV0(skillDialog, SkillDialog);
gui->draw();
mainGraphics->updateScreen();
- delete2(skillDialog);
+ delete2(skillDialog)
}
SECTION("SocialWindow")
{
CREATEWIDGETV0(socialWindow, SocialWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(socialWindow);
+ delete2(socialWindow)
}
SECTION("StatusWindow")
{
@@ -690,7 +690,7 @@ TEST_CASE("Windows tests", "windowmanager")
CREATEWIDGETV0(statusWindow, StatusWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(statusWindow);
+ delete2(statusWindow)
delete groups[0];
groups.clear();
}
@@ -702,8 +702,8 @@ TEST_CASE("Windows tests", "windowmanager")
textCommand);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
- delete2(textCommand);
+ delete2(dialog)
+ delete2(textCommand)
}
SECTION("TextDialog")
@@ -712,7 +712,7 @@ TEST_CASE("Windows tests", "windowmanager")
"", "", nullptr, false);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("TextSelectDialog")
{
@@ -720,14 +720,14 @@ TEST_CASE("Windows tests", "windowmanager")
"", "", AllowQuit_false);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("TradeWindow")
{
CREATEWIDGETV0(tradeWindow, TradeWindow);
gui->draw();
mainGraphics->updateScreen();
- delete2(tradeWindow);
+ delete2(tradeWindow)
}
SECTION("UpdaterWindow")
{
@@ -735,14 +735,14 @@ TEST_CASE("Windows tests", "windowmanager")
"", "", false, UpdateType::Skip);
gui->draw();
mainGraphics->updateScreen();
- delete2(updaterWindow);
+ delete2(updaterWindow)
}
SECTION("WhoIsOnline")
{
CREATEWIDGETV0(whoIsOnline, WhoIsOnline);
gui->draw();
mainGraphics->updateScreen();
- delete2(whoIsOnline);
+ delete2(whoIsOnline)
}
SECTION("WorldSelectDialog")
{
@@ -751,77 +751,77 @@ TEST_CASE("Windows tests", "windowmanager")
worlds);
gui->draw();
mainGraphics->updateScreen();
- delete2(dialog);
+ delete2(dialog)
}
SECTION("popupMenu")
{
CREATEWIDGETV0(popupMenu, PopupMenu);
gui->draw();
mainGraphics->updateScreen();
- delete2(popupMenu);
+ delete2(popupMenu)
}
SECTION("skillPopup")
{
CREATEWIDGETV0(skillPopup, SkillPopup);
gui->draw();
mainGraphics->updateScreen();
- delete2(skillPopup);
+ delete2(skillPopup)
}
SECTION("SpeechBubble")
{
SpeechBubble *bubble = CREATEWIDGETR0(SpeechBubble);
gui->draw();
mainGraphics->updateScreen();
- delete2(bubble);
+ delete2(bubble)
}
SECTION("beingPopup")
{
CREATEWIDGETV0(beingPopup, BeingPopup);
gui->draw();
mainGraphics->updateScreen();
- delete2(beingPopup);
+ delete2(beingPopup)
}
SECTION("textPopup")
{
CREATEWIDGETV0(textPopup, TextPopup);
gui->draw();
mainGraphics->updateScreen();
- delete2(textPopup);
+ delete2(textPopup)
}
SECTION("textBoxPopup")
{
CREATEWIDGETV0(textBoxPopup, TextBoxPopup);
gui->draw();
mainGraphics->updateScreen();
- delete2(textBoxPopup);
+ delete2(textBoxPopup)
}
SECTION("itemPopup")
{
CREATEWIDGETV0(itemPopup, ItemPopup);
gui->draw();
mainGraphics->updateScreen();
- delete2(itemPopup);
+ delete2(itemPopup)
}
SECTION("spellPopup")
{
CREATEWIDGETV0(spellPopup, SpellPopup);
gui->draw();
mainGraphics->updateScreen();
- delete2(spellPopup);
+ delete2(spellPopup)
}
SECTION("StatusPopup")
{
StatusPopup *status = CREATEWIDGETR0(StatusPopup);
gui->draw();
mainGraphics->updateScreen();
- delete2(status);
+ delete2(status)
}
SECTION("desktop")
{
CREATEWIDGETV(desktop, Desktop, nullptr);
gui->draw();
mainGraphics->updateScreen();
- delete2(desktop);
+ delete2(desktop)
}
SECTION("connectionDialog")
{
@@ -831,18 +831,18 @@ TEST_CASE("Windows tests", "windowmanager")
State::SWITCH_SERVER);
gui->draw();
mainGraphics->updateScreen();
- delete2(connectionDialog);
+ delete2(connectionDialog)
}
UnitsDb::unload();
- delete2(localPlayer);
- delete2(userPalette);
- delete2(client);
- delete2(serverFeatures);
- delete2(inventoryHandler);
- delete2(charServerHandler);
- delete2(playerHandler);
- delete2(gui);
+ delete2(localPlayer)
+ delete2(userPalette)
+ delete2(client)
+ delete2(serverFeatures)
+ delete2(inventoryHandler)
+ delete2(charServerHandler)
+ delete2(playerHandler)
+ delete2(gui)
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
@@ -998,13 +998,13 @@ TEST_CASE("WindowManager", "create windows")
settings.limitFps = true;
UnitsDb::unload();
- delete2(localPlayer);
- delete2(client);
- delete2(serverFeatures);
- delete2(inventoryHandler);
- delete2(charServerHandler);
- delete2(playerHandler);
- delete2(gui);
+ delete2(localPlayer)
+ delete2(client)
+ delete2(serverFeatures)
+ delete2(inventoryHandler)
+ delete2(charServerHandler)
+ delete2(playerHandler)
+ delete2(gui)
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
diff --git a/src/unittests/integrity.cc b/src/unittests/integrity.cc
index b52d991a0..8b07d4732 100644
--- a/src/unittests/integrity.cc
+++ b/src/unittests/integrity.cc
@@ -352,8 +352,8 @@ TEST_CASE("integrity tests", "integrity")
ResourceManager::cleanOrphans(true);
- delete2(userPalette);
- delete2(client);
+ delete2(userPalette)
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
diff --git a/src/unittests/resources/dye/dye.cc b/src/unittests/resources/dye/dye.cc
index bf9ea5cb4..68f473378 100644
--- a/src/unittests/resources/dye/dye.cc
+++ b/src/unittests/resources/dye/dye.cc
@@ -2004,9 +2004,9 @@ TEST_CASE("Dye real dye", "")
dyeCheck("|A:#0000FFFF,FF000050", "arrow_up_A.png");
}
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
VirtFs::unmountDirSilent("data/test");
diff --git a/src/unittests/resources/dye/dyepalette.cc b/src/unittests/resources/dye/dyepalette.cc
index e5da0be04..e31052bc5 100644
--- a/src/unittests/resources/dye/dyepalette.cc
+++ b/src/unittests/resources/dye/dyepalette.cc
@@ -392,7 +392,7 @@ TEST_CASE("DyePalette tests", "")
REQUIRE(palette.mColors[0].value[2] == 46);
REQUIRE(palette.mColors[0].value[3] == 0x77);
}
- delete2(client);
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
VirtFs::unmountDirSilent("data/test");
diff --git a/src/unittests/resources/map/maplayer/drawfringenormal.cc b/src/unittests/resources/map/maplayer/drawfringenormal.cc
index 963084f8b..c94429a0f 100644
--- a/src/unittests/resources/map/maplayer/drawfringenormal.cc
+++ b/src/unittests/resources/map/maplayer/drawfringenormal.cc
@@ -514,13 +514,13 @@ TEST_CASE("MapLayer drawFringe normal", "")
REQUIRE(mock->mDraws[7].image == img1);
}
- delete2(localPlayer);
+ delete2(localPlayer)
delete map;
delete img1;
delete img2;
delete img3;
delete mock;
- delete2(theme);
+ delete2(theme)
GraphicsManager::deleteRenderers();
ResourceManager::cleanOrphans(true);
ResourceManager::deleteInstance();
diff --git a/src/unittests/resources/map/maplayer/drawfringesimple.cc b/src/unittests/resources/map/maplayer/drawfringesimple.cc
index c1d1e858a..6fded0f43 100644
--- a/src/unittests/resources/map/maplayer/drawfringesimple.cc
+++ b/src/unittests/resources/map/maplayer/drawfringesimple.cc
@@ -492,13 +492,13 @@ TEST_CASE("MapLayer drawFringe simple", "")
REQUIRE(mock->mDraws[1].image == img2);
}
- delete2(localPlayer);
+ delete2(localPlayer)
delete map;
delete img1;
delete img2;
delete img3;
delete mock;
- delete2(theme);
+ delete2(theme)
GraphicsManager::deleteRenderers();
ResourceManager::cleanOrphans(true);
ResourceManager::deleteInstance();
diff --git a/src/unittests/resources/map/speciallayer.cc b/src/unittests/resources/map/speciallayer.cc
index 17f7e18b9..892d20737 100644
--- a/src/unittests/resources/map/speciallayer.cc
+++ b/src/unittests/resources/map/speciallayer.cc
@@ -280,9 +280,9 @@ TEST_CASE("SpecialLayer updateCache", "")
delete layer;
ResourceManager::cleanOrphans(false);
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
}
diff --git a/src/unittests/resources/resourcemanager/resourcemanager.cc b/src/unittests/resources/resourcemanager/resourcemanager.cc
index d40b197d1..6bb03ecb5 100644
--- a/src/unittests/resources/resourcemanager/resourcemanager.cc
+++ b/src/unittests/resources/resourcemanager/resourcemanager.cc
@@ -685,9 +685,9 @@ TEST_CASE("resourcemanager", "resourcemanager")
REQUIRE(ResourceManager::getDeletedResources().empty() == true);
}
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
}
diff --git a/src/unittests/resources/sdlimagehelper.cc b/src/unittests/resources/sdlimagehelper.cc
index cb20801fc..dad9ddc0e 100644
--- a/src/unittests/resources/sdlimagehelper.cc
+++ b/src/unittests/resources/sdlimagehelper.cc
@@ -548,9 +548,9 @@ TEST_CASE("sdlimagehelper combineSurface", "")
MSDL_FreeSurface(surface2);
}
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
}
diff --git a/src/unittests/resources/sprite/animatedsprite.cc b/src/unittests/resources/sprite/animatedsprite.cc
index 33b5529b2..376dfb79d 100644
--- a/src/unittests/resources/sprite/animatedsprite.cc
+++ b/src/unittests/resources/sprite/animatedsprite.cc
@@ -192,7 +192,7 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
delete sprite2;
}
- delete2(client);
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
}
diff --git a/src/unittests/sdl.cc b/src/unittests/sdl.cc
index 54b415e66..c826fdfec 100644
--- a/src/unittests/sdl.cc
+++ b/src/unittests/sdl.cc
@@ -396,9 +396,9 @@ TEST_CASE("sdl tests", "sdl")
}
ResourceManager::cleanOrphans(true);
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
diff --git a/src/unittests/utils/chatutils.cc b/src/unittests/utils/chatutils.cc
index 1069f6b5d..0121094d8 100644
--- a/src/unittests/utils/chatutils.cc
+++ b/src/unittests/utils/chatutils.cc
@@ -249,9 +249,9 @@ TEST_CASE("chatutils replaceVars", "")
Party::clearParties();
}
- delete2(actorManager);
- delete2(localPlayer);
- delete2(client);
+ delete2(actorManager)
+ delete2(localPlayer)
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
}
diff --git a/src/unittests/utils/checkutils.cc b/src/unittests/utils/checkutils.cc
index a80a24c74..8244248ca 100644
--- a/src/unittests/utils/checkutils.cc
+++ b/src/unittests/utils/checkutils.cc
@@ -76,7 +76,7 @@ static bool testFailAlways1()
static bool testFailAlways2()
{
- reportAlways("test fail");
+ reportAlways("test fail")
return false;
}
@@ -96,7 +96,7 @@ TEST_CASE("CheckUtils", "")
SECTION("reportAlways")
{
- reportAlwaysReal("test report");
+ reportAlwaysReal("test report")
}
SECTION("failFalse")
diff --git a/src/unittests/utils/itemxmlutils.cc b/src/unittests/utils/itemxmlutils.cc
index 82cb5e25f..a73225f85 100644
--- a/src/unittests/utils/itemxmlutils.cc
+++ b/src/unittests/utils/itemxmlutils.cc
@@ -211,9 +211,9 @@ TEST_CASE("itemxmlutils readItemStatsString 1", "")
{
delete (*it).second;
}
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data/test");
VirtFs::unmountDirSilent("../data/test");
@@ -413,9 +413,9 @@ TEST_CASE("itemxmlutils readItemStatsVector 1", "")
{
delete (*it).second;
}
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data/test");
VirtFs::unmountDirSilent("../data/test");
diff --git a/src/unittests/utils/translation/poparser.cc b/src/unittests/utils/translation/poparser.cc
index aede83335..233eaa2a9 100644
--- a/src/unittests/utils/translation/poparser.cc
+++ b/src/unittests/utils/translation/poparser.cc
@@ -130,7 +130,7 @@ TEST_CASE("PoParser tests", "PoParser")
delete parser;
delete dict;
}
- delete2(client);
+ delete2(client)
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
}
diff --git a/src/unittests/utils/xml.cc b/src/unittests/utils/xml.cc
index 4711873ce..8165c23ef 100644
--- a/src/unittests/utils/xml.cc
+++ b/src/unittests/utils/xml.cc
@@ -395,8 +395,8 @@ TEST_CASE("xml doc", "")
::remove(tempXmlName);
}
- delete2(theme);
- delete2(client);
+ delete2(theme)
+ delete2(client)
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
diff --git a/src/unittests/utils/xmlutils.cc b/src/unittests/utils/xmlutils.cc
index 5d1bc4c46..0cc23fd90 100644
--- a/src/unittests/utils/xmlutils.cc
+++ b/src/unittests/utils/xmlutils.cc
@@ -96,9 +96,9 @@ TEST_CASE("xmlutils readXmlIntVector 1", "")
REQUIRE(1 == arr[3]);
REQUIRE(1 == arr[4]);
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
@@ -154,9 +154,9 @@ TEST_CASE("xmlutils readXmlStringMap 1", "")
REQUIRE(arr["xD"] == "1");
REQUIRE(arr["Metal"] == "26");
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data");
VirtFs::unmountDirSilent("../data");
@@ -214,9 +214,9 @@ TEST_CASE("xmlutils readXmlIntMap 1", "")
REQUIRE(arr[10] == 20);
REQUIRE(arr[3] == 0);
- delete2(userPalette);
- delete2(theme);
- delete2(client);
+ delete2(userPalette)
+ delete2(theme)
+ delete2(client)
ResourceManager::deleteInstance();
VirtFs::unmountDirSilent("data/test");
VirtFs::unmountDirSilent("../data/test");
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index 3b2b4ae8a..942801de2 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -387,7 +387,7 @@ bool retrieveBuffer(std::string& text, size_t& pos)
{
SDL_SysWMinfo info;
- SDL_VERSION(&info.version);
+ SDL_VERSION(&info.version)
if (SDL::getWindowWMInfo(mainGraphics->getWindow(), &info))
{
Display *const dpy = info.info.x11.display;
diff --git a/src/utils/dumpsizes.cpp b/src/utils/dumpsizes.cpp
index f1a9a613a..8275133a5 100644
--- a/src/utils/dumpsizes.cpp
+++ b/src/utils/dumpsizes.cpp
@@ -27,7 +27,7 @@
#include "debug.h"
#define dumpSize(str) \
- logger->log(" sizeof("#str"): %d", CAST_S32(sizeof(str)));
+ logger->log(" sizeof("#str"): %d", CAST_S32(sizeof(str)))
void dumpSizes()
{
diff --git a/src/utils/itemxmlutils.cpp b/src/utils/itemxmlutils.cpp
index 8ecbeeda6..ac8e48e2b 100644
--- a/src/utils/itemxmlutils.cpp
+++ b/src/utils/itemxmlutils.cpp
@@ -81,7 +81,7 @@ void readItemStatsString(std::string &effect,
{
if (translator == nullptr)
{
- reportAlways("called readItemStatsString without translator");
+ reportAlways("called readItemStatsString without translator")
return;
}
@@ -102,7 +102,7 @@ void readItemStatsVector(STD_VECTOR<std::string> &effect,
{
if (translator == nullptr)
{
- reportAlways("called readItemStatsVector without translator");
+ reportAlways("called readItemStatsVector without translator")
return;
}
diff --git a/src/utils/pnglib.cpp b/src/utils/pnglib.cpp
index 4393be3e2..6d591515d 100644
--- a/src/utils/pnglib.cpp
+++ b/src/utils/pnglib.cpp
@@ -47,7 +47,7 @@ bool PngLib::writePNG(SDL_Surface *const surface,
nullptr, nullptr, nullptr);
if (png_ptr == nullptr)
{
- reportAlways("Had trouble creating png_structp");
+ reportAlways("Had trouble creating png_structp")
return false;
}
@@ -55,14 +55,14 @@ bool PngLib::writePNG(SDL_Surface *const surface,
if (info_ptr == nullptr)
{
png_destroy_write_struct(&png_ptr, static_cast<png_infopp>(nullptr));
- reportAlways("Could not create png_info");
+ reportAlways("Could not create png_info")
return false;
}
if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_write_struct(&png_ptr, &info_ptr);
- reportAlways("problem writing to %s", filename.c_str());
+ reportAlways("problem writing to %s", filename.c_str())
return false;
}
@@ -70,7 +70,7 @@ bool PngLib::writePNG(SDL_Surface *const surface,
if (fp == nullptr)
{
reportAlways("could not open file %s for writing",
- filename.c_str());
+ filename.c_str())
return false;
}
diff --git a/src/utils/sdl2logger.cpp b/src/utils/sdl2logger.cpp
index 16d8aa7d0..8bba68d6d 100644
--- a/src/utils/sdl2logger.cpp
+++ b/src/utils/sdl2logger.cpp
@@ -117,7 +117,7 @@ static void logCallback(void *userData A_UNUSED,
}
reportAlways("%s %s",
message.c_str(),
- msg);
+ msg)
}
static SDL_AssertState assertCallback(const SDL_AssertData *data,
@@ -128,7 +128,7 @@ static SDL_AssertState assertCallback(const SDL_AssertData *data,
data->function,
data->filename,
data->linenum,
- data->condition);
+ data->condition)
return SDL_ASSERTION_IGNORE;
}
diff --git a/src/utils/sdlhelper.cpp b/src/utils/sdlhelper.cpp
index 474840d2a..7e10352f4 100644
--- a/src/utils/sdlhelper.cpp
+++ b/src/utils/sdlhelper.cpp
@@ -128,7 +128,7 @@ void *SDL::createGLContext(SDL_Surface *const window A_UNUSED,
const int profile)
{
SDL_SysWMinfo info;
- SDL_VERSION(&info.version);
+ SDL_VERSION(&info.version)
SDL_GetWMInfo(&info);
void *context = GlxHelper::createContext(info.info.x11.window,
info.info.x11.display, major, minor, profile);
@@ -162,7 +162,7 @@ void *SDL::createGLContext(SDL_Surface *const window A_UNUSED,
void SDL::makeCurrentContext(void *const context)
{
SDL_SysWMinfo info;
- SDL_VERSION(&info.version);
+ SDL_VERSION(&info.version)
SDL_GetWMInfo(&info);
GlxHelper::makeCurrent(info.info.x11.window,
info.info.x11.display,
diff --git a/src/utils/translation/translationmanager.cpp b/src/utils/translation/translationmanager.cpp
index 5b1c2d67a..0f691f5f8 100644
--- a/src/utils/translation/translationmanager.cpp
+++ b/src/utils/translation/translationmanager.cpp
@@ -66,9 +66,9 @@ void TranslationManager::loadGettextLang()
void TranslationManager::close()
{
- delete2(translator);
- delete2(dictionary);
- delete2(reverseDictionary);
+ delete2(translator)
+ delete2(dictionary)
+ delete2(reverseDictionary)
}
PoDict *TranslationManager::loadLang(const LangVect &lang,
diff --git a/src/utils/xml/libxml.cpp b/src/utils/xml/libxml.cpp
index 7fcdfd7fc..a4c1ea7ba 100644
--- a/src/utils/xml/libxml.cpp
+++ b/src/utils/xml/libxml.cpp
@@ -118,7 +118,7 @@ namespace XML
if (size < 0)
{
reportAlways("Error loading XML file %s",
- filename.c_str());
+ filename.c_str())
}
else
{
@@ -131,7 +131,7 @@ namespace XML
else if (skipError == SkipError_false)
{
reportAlways("Error loading XML file %s",
- filename.c_str());
+ filename.c_str())
}
}
@@ -142,12 +142,12 @@ namespace XML
if (mDoc == nullptr)
{
- reportAlways("Error parsing XML file %s", filename.c_str());
+ reportAlways("Error parsing XML file %s", filename.c_str())
}
}
else if (skipError == SkipError_false)
{
- reportAlways("Error loading XML file %s", filename.c_str());
+ reportAlways("Error loading XML file %s", filename.c_str())
}
mIsValid = valid;
BLOCK_END("XML::Document::Document")
@@ -304,7 +304,7 @@ namespace XML
void initXML()
{
xmlInitParser();
- LIBXML_TEST_VERSION;
+ LIBXML_TEST_VERSION
// Suppress libxml2 error messages
xmlSetGenericErrorFunc(nullptr, &xmlErrorLogger);
diff --git a/src/utils/xml/pugixml.cpp b/src/utils/xml/pugixml.cpp
index 4919b34a8..dfc40a970 100644
--- a/src/utils/xml/pugixml.cpp
+++ b/src/utils/xml/pugixml.cpp
@@ -96,7 +96,7 @@ namespace XML
if (size < 0)
{
reportAlways("Error loading XML file %s",
- filename.c_str());
+ filename.c_str())
}
else
{
@@ -109,7 +109,7 @@ namespace XML
else if (skipError == SkipError_false)
{
reportAlways("Error loading XML file %s",
- filename.c_str());
+ filename.c_str())
}
}
@@ -135,7 +135,7 @@ namespace XML
}
else if (skipError == SkipError_false)
{
- reportAlways("Error loading %s", filename.c_str());
+ reportAlways("Error loading %s", filename.c_str())
}
mIsValid = valid;
BLOCK_END("XML::Document::Document")
diff --git a/src/utils/xml/tinyxml2.cpp b/src/utils/xml/tinyxml2.cpp
index 48ea9c891..99fa09001 100644
--- a/src/utils/xml/tinyxml2.cpp
+++ b/src/utils/xml/tinyxml2.cpp
@@ -95,7 +95,7 @@ namespace XML
if (size < 0)
{
reportAlways("Error loading XML file %s",
- filename.c_str());
+ filename.c_str())
}
else
{
@@ -108,7 +108,7 @@ namespace XML
else if (skipError == SkipError_false)
{
reportAlways("Error loading XML file %s",
- filename.c_str());
+ filename.c_str())
}
}
@@ -128,7 +128,7 @@ namespace XML
}
else if (skipError == SkipError_false)
{
- reportAlways("Error loading %s", filename.c_str());
+ reportAlways("Error loading %s", filename.c_str())
}
mIsValid = valid;
BLOCK_END("XML::Document::Document")