summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-12 20:26:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-12 20:26:59 +0300
commitbebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43 (patch)
tree4d631106f76ba8a052dc2ef8b23b8a968040db82 /src
parent67638eeec5267977940dce29c5a94ce4d093ed69 (diff)
downloadmanaplus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.gz
manaplus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.bz2
manaplus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.xz
manaplus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.zip
Add noexcept in some files.
Diffstat (limited to 'src')
-rw-r--r--src/actormanager.h14
-rw-r--r--src/avatar.h38
-rw-r--r--src/being/actor.h6
-rw-r--r--src/being/actorsprite.h4
-rw-r--r--src/being/being.h6
-rw-r--r--src/being/flooritem.h24
-rw-r--r--src/being/localplayer.h34
-rw-r--r--src/being/playerrelations.h6
-rw-r--r--src/client.h2
-rw-r--r--src/configuration.h6
-rw-r--r--src/dyetool/client.h2
-rw-r--r--src/dyetool/gui/viewport.h14
-rw-r--r--src/equipment.h2
-rw-r--r--src/events/actionevent.h2
-rw-r--r--src/events/event.h2
-rw-r--r--src/events/inputguievent.h2
-rw-r--r--src/events/keyevent.h6
-rw-r--r--src/events/mouseevent.h10
-rw-r--r--src/game.h6
-rw-r--r--src/graphicsmanager.h6
-rw-r--r--src/gui/gui.h4
-rw-r--r--src/gui/models/keylistmodel.h8
-rw-r--r--src/gui/models/namesmodel.h4
-rw-r--r--src/gui/models/shopitems.h2
-rw-r--r--src/gui/onlineplayer.h12
-rw-r--r--src/gui/palette.h2
-rw-r--r--src/gui/sdlinput.h4
-rw-r--r--src/gui/shortcut/emoteshortcut.h4
-rw-r--r--src/gui/shortcut/itemshortcut.h6
-rw-r--r--src/gui/shortcut/shortcutbase.h6
-rw-r--r--src/gui/shortcut/spellshortcut.h6
-rw-r--r--src/gui/skin.h14
-rw-r--r--src/gui/theme.h2
-rw-r--r--src/gui/viewport.h10
-rw-r--r--src/gui/widgets/browserbox.h18
-rw-r--r--src/gui/widgets/button.h16
-rw-r--r--src/gui/widgets/flowcontainer.h4
-rw-r--r--src/gui/widgets/guitable.h4
-rw-r--r--src/gui/widgets/icon.h2
-rw-r--r--src/gui/widgets/itemcontainer.h6
-rw-r--r--src/gui/widgets/layoutcell.h8
-rw-r--r--src/gui/widgets/listbox.h16
-rw-r--r--src/gui/widgets/popup.h18
-rw-r--r--src/gui/widgets/progressbar.h12
-rw-r--r--src/gui/widgets/scrollarea.cpp2
-rw-r--r--src/gui/widgets/scrollarea.h4
-rw-r--r--src/gui/widgets/setupitem.h10
-rw-r--r--src/gui/widgets/shortcutcontainer.h6
-rw-r--r--src/gui/widgets/sliderlist.h2
-rw-r--r--src/gui/widgets/tabbedarea.h22
-rw-r--r--src/gui/widgets/tabs/chat/chattab.h14
-rw-r--r--src/gui/widgets/tabs/chat/whispertab.h2
-rw-r--r--src/gui/widgets/tabs/setuptab.h4
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.h6
-rw-r--r--src/gui/widgets/tabs/tab.h4
-rw-r--r--src/gui/widgets/textbox.h6
-rw-r--r--src/gui/widgets/textfield.h2
-rw-r--r--src/gui/widgets/textpreview.h4
-rw-r--r--src/gui/widgets/widget.h12
-rw-r--r--src/gui/widgets/widget2.h4
-rw-r--r--src/gui/widgets/window.h26
-rw-r--r--src/gui/windows/chatwindow.h2
-rw-r--r--src/gui/windows/shopwindow.h2
-rw-r--r--src/gui/windows/skilldialog.h2
-rw-r--r--src/gui/windows/socialwindow.h6
-rw-r--r--src/gui/windows/textdialog.h2
-rw-r--r--src/gui/windows/textselectdialog.h6
-rw-r--r--src/gui/windows/tradewindow.h2
-rw-r--r--src/gui/windows/whoisonline.h6
-rw-r--r--src/guild.h16
-rw-r--r--src/input/joystick.h12
-rw-r--r--src/input/keyboardconfig.h2
-rw-r--r--src/input/keyinput.h18
-rw-r--r--src/input/mouseinput.h34
-rw-r--r--src/net/messagein.h8
-rw-r--r--src/net/serverinfo.h2
-rw-r--r--src/party.h10
-rw-r--r--src/render/graphics.h2
-rw-r--r--src/resources/beinginfo.h78
-rw-r--r--src/resources/image/image.h26
-rw-r--r--src/resources/image/subimage.h2
-rw-r--r--src/resources/imageset.h16
-rw-r--r--src/resources/inventory/inventory.h8
-rw-r--r--src/resources/item/cardslist.h2
-rw-r--r--src/resources/item/complexitem.h2
-rw-r--r--src/resources/item/item.h60
-rw-r--r--src/resources/item/shopitem.h14
-rw-r--r--src/resources/iteminfo.h110
-rw-r--r--src/resources/map/mapitem.h14
-rw-r--r--src/resources/map/tileset.h5
-rw-r--r--src/resources/modinfo.h14
-rw-r--r--src/resources/resource.h18
-rw-r--r--src/resources/resourcemanager/resourcemanager.h2
-rw-r--r--src/resources/skill/skillinfo.h2
-rw-r--r--src/resources/sprite/animatedsprite.h4
-rw-r--r--src/soundmanager.h2
-rw-r--r--src/text.h8
-rw-r--r--src/textcommand.h28
-rw-r--r--src/variabledata.h8
-rw-r--r--src/vector.h22
100 files changed, 545 insertions, 542 deletions
diff --git a/src/actormanager.h b/src/actormanager.h
index 8d4170275..bb00f1e5b 100644
--- a/src/actormanager.h
+++ b/src/actormanager.h
@@ -318,22 +318,22 @@ class ActorManager final: public ConfigListener
void setAttackMobs(const std::list<std::string> &mobs)
{ mAttackMobs = mobs; }
- int getPriorityAttackMobsSize() const A_WARN_UNUSED
+ int getPriorityAttackMobsSize() const noexcept2 A_WARN_UNUSED
{ return CAST_S32(mPriorityAttackMobs.size()); }
- int getAttackMobsSize() const A_WARN_UNUSED
+ int getAttackMobsSize() const noexcept2 A_WARN_UNUSED
{ return CAST_S32(mAttackMobs.size()); }
- int getPickupItemsSize() const A_WARN_UNUSED
+ int getPickupItemsSize() const noexcept2 A_WARN_UNUSED
{ return CAST_S32(mPickupItems.size()); }
#define defList(list1, mob) \
bool isIn##list1##List(const std::string &name) const A_WARN_UNUSED\
{ return m##list1##mob##Set.find(name) != m##list1##mob##Set.end(); }\
void rebuild##list1##mob();\
- std::set<std::string> get##list1##mob##Set() const A_WARN_UNUSED\
+ std::set<std::string> get##list1##mob##Set() const noexcept2 A_WARN_UNUSED\
{ return m##list1##mob##Set; }\
- std::list<std::string> get##list1##mob() const A_WARN_UNUSED\
+ std::list<std::string> get##list1##mob() const noexcept2 A_WARN_UNUSED\
{ return m##list1##mob; }
defList(Attack, Mobs)
@@ -342,10 +342,10 @@ class ActorManager final: public ConfigListener
defList(Pickup, Items)
defList(IgnorePickup, Items)
- const StringIntMap &getAttackMobsMap() const A_WARN_UNUSED
+ const StringIntMap &getAttackMobsMap() const noexcept2 A_WARN_UNUSED
{ return mAttackMobsMap; }
- const StringIntMap &getPriorityAttackMobsMap() const A_WARN_UNUSED
+ const StringIntMap &getPriorityAttackMobsMap() const noexcept2 A_WARN_UNUSED
{ return mPriorityAttackMobsMap; }
int getAttackMobIndex(const std::string &name) const A_WARN_UNUSED;
diff --git a/src/avatar.h b/src/avatar.h
index 1eab1f0d5..3be78dc3c 100644
--- a/src/avatar.h
+++ b/src/avatar.h
@@ -49,7 +49,7 @@ class Avatar notfinal
/**
* Returns the avatar's name.
*/
- std::string getName() const A_WARN_UNUSED
+ std::string getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
/**
@@ -61,7 +61,7 @@ class Avatar notfinal
/**
* Returns the avatar's original name.
*/
- std::string getOriginalName() const A_WARN_UNUSED
+ std::string getOriginalName() const noexcept2 A_WARN_UNUSED
{ return mOriginalName; }
std::string getComplexName() const A_WARN_UNUSED;
@@ -77,7 +77,7 @@ class Avatar notfinal
/**
* Returns the avatar's online status.
*/
- bool getOnline() const A_WARN_UNUSED
+ bool getOnline() const noexcept2 A_WARN_UNUSED
{ return mOnline; }
/**
@@ -86,97 +86,97 @@ class Avatar notfinal
void setOnline(const bool online)
{ mOnline = online; }
- int getHp() const A_WARN_UNUSED
+ int getHp() const noexcept2 A_WARN_UNUSED
{ return mHp; }
void setHp(const int hp)
{ mHp = hp; }
- int getMaxHp() const A_WARN_UNUSED
+ int getMaxHp() const noexcept2 A_WARN_UNUSED
{ return mMaxHp; }
void setMaxHp(const int maxHp)
{ mMaxHp = maxHp; }
- int getDamageHp() const A_WARN_UNUSED
+ int getDamageHp() const noexcept2 A_WARN_UNUSED
{ return mDamageHp; }
void setDamageHp(const int damageHp)
{ mDamageHp = damageHp; }
- bool getDisplayBold() const A_WARN_UNUSED
+ bool getDisplayBold() const noexcept2 A_WARN_UNUSED
{ return mDisplayBold; }
void setDisplayBold(const bool displayBold)
{ mDisplayBold = displayBold; }
- int getLevel() const A_WARN_UNUSED
+ int getLevel() const noexcept2 A_WARN_UNUSED
{ return mLevel; }
void setLevel(const int level)
{ mLevel = level; }
- std::string getMap() const A_WARN_UNUSED
+ std::string getMap() const noexcept2 A_WARN_UNUSED
{ return mMap; }
void setMap(const std::string &map)
{ mMap = map; }
- int getX() const A_WARN_UNUSED
+ int getX() const noexcept2 A_WARN_UNUSED
{ return mX; }
void setX(const int x)
{ mX = x; }
- int getY() const A_WARN_UNUSED
+ int getY() const noexcept2 A_WARN_UNUSED
{ return mY; }
void setY(const int y)
{ mY = y; }
- int getType() const A_WARN_UNUSED
+ int getType() const noexcept2 A_WARN_UNUSED
{ return mType; }
void setType(const int n)
{ mType = n; }
- int getExp() const A_WARN_UNUSED
+ int getExp() const noexcept2 A_WARN_UNUSED
{ return mExp; }
void setExp(const int n)
{ mExp = n; }
- BeingId getID() const A_WARN_UNUSED
+ BeingId getID() const noexcept2 A_WARN_UNUSED
{ return mId; }
void setID(const BeingId id)
{ mId = id; }
- int getCharId() const A_WARN_UNUSED
+ int getCharId() const noexcept2 A_WARN_UNUSED
{ return mCharId; }
void setCharId(const int id)
{ mCharId = id; }
- GenderT getGender() const A_WARN_UNUSED
+ GenderT getGender() const noexcept2 A_WARN_UNUSED
{ return mGender; }
void setGender(const GenderT g)
{ mGender = g; }
- int getRace() const A_WARN_UNUSED
+ int getRace() const noexcept2 A_WARN_UNUSED
{ return mRace; }
void setRace(const int r)
{ mRace = r; }
- const std::string &getIp() const A_WARN_UNUSED
+ const std::string &getIp() const noexcept2 A_WARN_UNUSED
{ return mIp; }
void setIp(const std::string &ip)
{ mIp = ip; }
- bool getPoison() const A_WARN_UNUSED
+ bool getPoison() const noexcept2 A_WARN_UNUSED
{ return mPoison; }
void setPoison(const bool b)
diff --git a/src/being/actor.h b/src/being/actor.h
index 72a9810ee..17029fbc5 100644
--- a/src/being/actor.h
+++ b/src/being/actor.h
@@ -70,7 +70,7 @@ class Actor notfinal
/**
* Returns the pixel position of this actor.
*/
- const Vector &getPixelPositionF() const A_WARN_UNUSED
+ const Vector &getPixelPositionF() const noexcept2 A_WARN_UNUSED
{ return mPos; }
/**
@@ -81,7 +81,7 @@ class Actor notfinal
/**
* Returns the pixels X coordinate of the actor.
*/
- int getPixelX() const A_WARN_UNUSED
+ int getPixelX() const noexcept2 A_WARN_UNUSED
{ return CAST_S32(mPos.x); }
/**
@@ -124,7 +124,7 @@ class Actor notfinal
virtual void setMap(Map *const map);
- const Map* getMap() const A_WARN_UNUSED
+ const Map* getMap() const noexcept2 A_WARN_UNUSED
{ return mMap; }
int mPixelX;
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h
index 4e6d38b73..f01a3eb43 100644
--- a/src/being/actorsprite.h
+++ b/src/being/actorsprite.h
@@ -58,10 +58,10 @@ class ActorSprite notfinal : public CompoundSprite, public Actor
virtual ~ActorSprite();
- BeingId getId() const A_WARN_UNUSED
+ BeingId getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
- void setId(const BeingId id)
+ void setId(const BeingId id) noexcept2
{ mId = id; }
/**
diff --git a/src/being/being.h b/src/being/being.h
index 581386d3e..e1f97a08b 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -142,13 +142,13 @@ class Being notfinal : public ActorSprite,
const int dstY) restrict2;
void setCachedDestination(const int dstX,
- const int dstY) restrict2
+ const int dstY) restrict2 noexcept2
{ mCachedX = dstX; mCachedY = dstY; }
- int getCachedX() const A_WARN_UNUSED
+ int getCachedX() const noexcept2 A_WARN_UNUSED
{ return mCachedX; }
- int getCachedY() const A_WARN_UNUSED
+ int getCachedY() const noexcept2 A_WARN_UNUSED
{ return mCachedY; }
/**
diff --git a/src/being/flooritem.h b/src/being/flooritem.h
index 7803c6cac..248a8b351 100644
--- a/src/being/flooritem.h
+++ b/src/being/flooritem.h
@@ -78,7 +78,7 @@ class FloorItem final : public ActorSprite
/**
* Returns the item ID.
*/
- int getItemId() const A_WARN_UNUSED
+ int getItemId() const noexcept2 A_WARN_UNUSED
{ return mItemId; }
/**
@@ -95,41 +95,41 @@ class FloorItem final : public ActorSprite
int getTileY() const override final A_WARN_UNUSED
{ return mY; }
- void incrementPickup()
+ void incrementPickup() noexcept2
{ mPickupCount ++; }
- unsigned getPickupCount() const A_WARN_UNUSED
+ unsigned getPickupCount() const noexcept2 A_WARN_UNUSED
{ return mPickupCount; }
- ItemColor getColor() const A_WARN_UNUSED
+ ItemColor getColor() const noexcept2 A_WARN_UNUSED
{ return mColor; }
- bool getShowMsg() const A_WARN_UNUSED
+ bool getShowMsg() const noexcept2 A_WARN_UNUSED
{ return mShowMsg; }
- void setShowMsg(const bool n)
+ void setShowMsg(const bool n) noexcept2
{ mShowMsg = n; }
- void disableHightlight()
+ void disableHightlight() noexcept2
{ mHighlight = false; }
- CursorT getHoverCursor() const A_WARN_UNUSED
+ CursorT getHoverCursor() const noexcept2 A_WARN_UNUSED
{ return mCursor; }
void setCards(const int *const cards, int sz);
int getCard(const int index) const;
- int getRefine() const A_WARN_UNUSED
+ int getRefine() const noexcept2 A_WARN_UNUSED
{ return mRefine; }
- ItemTypeT getItemType() const A_WARN_UNUSED
+ ItemTypeT getItemType() const noexcept2 A_WARN_UNUSED
{ return mItemType; }
- Identified getIdentified() const A_WARN_UNUSED
+ Identified getIdentified() const noexcept2 A_WARN_UNUSED
{ return mIdentified; }
- Damaged getDamaged() const A_WARN_UNUSED
+ Damaged getDamaged() const noexcept2 A_WARN_UNUSED
{ return mDamaged; }
private:
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 3a7f4605d..1b97e3a18 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -116,7 +116,7 @@ class LocalPlayer final : public Being,
void setGMLevel(const int level);
- int getGMLevel() const A_WARN_UNUSED
+ int getGMLevel() const noexcept2 A_WARN_UNUSED
{ return mGMLevel; }
void stopAttack(const bool keepAttack = false);
@@ -150,7 +150,7 @@ class LocalPlayer final : public Being,
/**
* Gets the walking direction
*/
- unsigned char getWalkingDir() const A_WARN_UNUSED
+ unsigned char getWalkingDir() const noexcept2 A_WARN_UNUSED
{ return mWalkingDir; }
/**
@@ -192,13 +192,13 @@ class LocalPlayer final : public Being,
{ mPathSetByMouse = true; }
/** Tells if the path has been set by mouse. */
- bool isPathSetByMouse() const A_WARN_UNUSED
+ bool isPathSetByMouse() const noexcept2 A_WARN_UNUSED
{ return mPathSetByMouse; }
- unsigned int getMoveState() const A_WARN_UNUSED
+ unsigned int getMoveState() const noexcept2 A_WARN_UNUSED
{ return mMoveState; }
- void setMoveState(const unsigned int n)
+ void setMoveState(const unsigned int n) noexcept2
{ mMoveState = n; }
std::string getPingTime() const A_WARN_UNUSED;
@@ -240,7 +240,7 @@ class LocalPlayer final : public Being,
void setHalfAway(const bool n)
{ mInactive = n; }
- bool getHalfAway() const A_WARN_UNUSED
+ bool getHalfAway() const noexcept2 A_WARN_UNUSED
{ return mInactive; }
void afkRespond(ChatTab *const tab, const std::string &nick);
@@ -272,7 +272,7 @@ class LocalPlayer final : public Being,
void setRealPos(const int x, const int y);
- bool isServerBuggy() const A_WARN_UNUSED
+ bool isServerBuggy() const noexcept2 A_WARN_UNUSED
{ return mIsServerBuggy; }
void fixPos();
@@ -308,15 +308,15 @@ class LocalPlayer final : public Being,
*/
void setNextDest(const int x, const int y);
- int getNextDestX() const A_WARN_UNUSED
+ int getNextDestX() const noexcept2 A_WARN_UNUSED
{ return mNextDestX; }
- int getNextDestY() const A_WARN_UNUSED
+ int getNextDestY() const noexcept2 A_WARN_UNUSED
{ return mNextDestY; }
void respawn();
- const FloorItem *getPickUpTarget() const A_WARN_UNUSED
+ const FloorItem *getPickUpTarget() const noexcept2 A_WARN_UNUSED
{ return mPickUpTarget; }
void unSetPickUpTarget()
@@ -330,13 +330,13 @@ class LocalPlayer final : public Being,
/**
* Get the playername followed by the current player.
*/
- const std::string &getFollow() const A_WARN_UNUSED
+ const std::string &getFollow() const noexcept2 A_WARN_UNUSED
{ return mPlayerFollowed; }
/**
* Get the playername imitated by the current player.
*/
- const std::string &getImitate() const A_WARN_UNUSED
+ const std::string &getImitate() const noexcept2 A_WARN_UNUSED
{ return mPlayerImitated; }
/**
@@ -350,7 +350,7 @@ class LocalPlayer final : public Being,
* Gets if the engine has to check
* if the Player Name is to be displayed.
*/
- bool getCheckNameSetting() const A_WARN_UNUSED
+ bool getCheckNameSetting() const noexcept2 A_WARN_UNUSED
{ return mUpdateName; }
void fixAttackTarget();
@@ -411,19 +411,19 @@ class LocalPlayer final : public Being,
void updateMusic() const;
- void setAfkTime(const int v)
+ void setAfkTime(const int v) noexcept2
{ mAfkTime = v; }
void setAwayDialog(OkDialog *const dialog)
{ mAwayDialog = dialog; }
- AwayListener *getAwayListener() const A_WARN_UNUSED
+ AwayListener *getAwayListener() const noexcept2 A_WARN_UNUSED
{ return mAwayListener; }
- void setRename(const bool r)
+ void setRename(const bool r) noexcept2
{ mAllowRename = r; }
- bool getRename() const
+ bool getRename() const noexcept2
{ return mAllowRename; }
bool canMove() const;
diff --git a/src/being/playerrelations.h b/src/being/playerrelations.h
index 2c09cd01c..31a007637 100644
--- a/src/being/playerrelations.h
+++ b/src/being/playerrelations.h
@@ -127,6 +127,7 @@ class PlayerRelationsManager final
* \return A player ignore strategy, or nullptr
*/
const PlayerIgnoreStrategy *getPlayerIgnoreStrategy() const
+ noexcept2
A_WARN_UNUSED
{ return mIgnoreStrategy; }
@@ -134,6 +135,7 @@ class PlayerRelationsManager final
* Sets the strategy to call when ignoring players.
*/
void setPlayerIgnoreStrategy(PlayerIgnoreStrategy *const strategy)
+ noexcept2
{ mIgnoreStrategy = strategy; }
/**
@@ -163,7 +165,7 @@ class PlayerRelationsManager final
/**
* Do we persist our `ignore' setup?
*/
- bool getPersistIgnores() const
+ bool getPersistIgnores() const noexcept2 A_WARN_UNUSED
{ return mPersistIgnores; }
void ignoreTrade(const std::string &name) const;
@@ -177,7 +179,7 @@ class PlayerRelationsManager final
*
* @param value Whether to persist ignores
*/
- void setPersistIgnores(const bool value)
+ void setPersistIgnores(const bool value) noexcept2
{ mPersistIgnores = value; }
void addListener(PlayerRelationsListener *const listener)
diff --git a/src/client.h b/src/client.h
index 6b4c3c186..c57d790ff 100644
--- a/src/client.h
+++ b/src/client.h
@@ -78,7 +78,7 @@ class Client final : public ConfigListener,
void setState(const StateT state)
{ mState = state; }
- StateT getState() const A_WARN_UNUSED
+ StateT getState() const noexcept2 A_WARN_UNUSED
{ return mState; }
static bool isTmw() A_WARN_UNUSED;
diff --git a/src/configuration.h b/src/configuration.h
index 829f8201f..0395a42c9 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -339,7 +339,7 @@ class Configuration final : public ConfigurationObject
bool resetBoolValue(const std::string &key);
- const std::string &getConfigPath() const A_WARN_UNUSED
+ const std::string &getConfigPath() const noexcept2 A_WARN_UNUSED
{ return mConfigPath; }
/**
@@ -355,12 +355,12 @@ class Configuration final : public ConfigurationObject
bool getBoolValue(const std::string &key) const A_WARN_UNUSED;
- std::string getDirectory() const A_WARN_UNUSED
+ std::string getDirectory() const noexcept2 A_WARN_UNUSED
{ return mDirectory; }
void removeOldKeys();
- std::string getFileName() const A_WARN_UNUSED
+ std::string getFileName() const noexcept2 A_WARN_UNUSED
{ return mFilename; }
void writeUpdated();
diff --git a/src/dyetool/client.h b/src/dyetool/client.h
index bdcdadc09..4ad3aa422 100644
--- a/src/dyetool/client.h
+++ b/src/dyetool/client.h
@@ -65,7 +65,7 @@ class Client final : public ActionListener
void setState(const StateT state)
{ mState = state; }
- StateT getState() const A_WARN_UNUSED
+ StateT getState() const noexcept2 A_WARN_UNUSED
{ return mState; }
void action(const ActionEvent &event) override final;
diff --git a/src/dyetool/gui/viewport.h b/src/dyetool/gui/viewport.h
index e5159976b..ab7b9710a 100644
--- a/src/dyetool/gui/viewport.h
+++ b/src/dyetool/gui/viewport.h
@@ -115,13 +115,13 @@ class Viewport final : public WindowContainer,
/**
* Returns camera x offset in pixels.
*/
- int getCameraX() const A_WARN_UNUSED
+ int getCameraX() const noexcept2 A_WARN_UNUSED
{ return mPixelViewX; }
/**
* Returns camera y offset in pixels.
*/
- int getCameraY() const A_WARN_UNUSED
+ int getCameraY() const noexcept2 A_WARN_UNUSED
{ return mPixelViewY; }
/**
@@ -135,21 +135,21 @@ class Viewport final : public WindowContainer,
*/
void cleanHoverItems();
- Map *getMap() const A_WARN_UNUSED
+ Map *getMap() const noexcept2 A_WARN_UNUSED
{ return mMap; }
void moveCamera(const int dx, const int dy);
- int getCameraRelativeX() const A_WARN_UNUSED
+ int getCameraRelativeX() const noexcept2 A_WARN_UNUSED
{ return mCameraRelativeX; }
- int getCameraRelativeY() const A_WARN_UNUSED
+ int getCameraRelativeY() const noexcept2 A_WARN_UNUSED
{ return mCameraRelativeY; }
- void setCameraRelativeX(const int n)
+ void setCameraRelativeX(const int n) noexcept2
{ mCameraRelativeX = n; }
- void setCameraRelativeY(const int n)
+ void setCameraRelativeY(const int n) noexcept2
{ mCameraRelativeY = n; }
void videoResized();
diff --git a/src/equipment.h b/src/equipment.h
index 8cd32a885..b67d24bdb 100644
--- a/src/equipment.h
+++ b/src/equipment.h
@@ -77,7 +77,7 @@ class Equipment final
void setBackend(Backend *const backend)
{ mBackend = backend; }
- const Backend *getBackend() const A_WARN_UNUSED
+ const Backend *getBackend() const noexcept2 A_WARN_UNUSED
{ return mBackend; }
private:
diff --git a/src/events/actionevent.h b/src/events/actionevent.h
index 3639e6294..1bf202595 100644
--- a/src/events/actionevent.h
+++ b/src/events/actionevent.h
@@ -123,7 +123,7 @@ class ActionEvent final : public Event
*
* @return The identifier of the event.
*/
- const std::string &getId() const A_WARN_UNUSED
+ const std::string &getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
protected:
diff --git a/src/events/event.h b/src/events/event.h
index 5bf7846ae..c0bf4fb46 100644
--- a/src/events/event.h
+++ b/src/events/event.h
@@ -101,7 +101,7 @@ class Event notfinal
*
* @return The source widget of the event.
*/
- Widget* getSource() const A_WARN_UNUSED
+ Widget* getSource() const noexcept2 A_WARN_UNUSED
{ return mSource; }
protected:
diff --git a/src/events/inputguievent.h b/src/events/inputguievent.h
index ea5b735b1..8d6e7d7ea 100644
--- a/src/events/inputguievent.h
+++ b/src/events/inputguievent.h
@@ -106,7 +106,7 @@ class InputGuiEvent: public Event
* false otherwise.
* @see consume
*/
- bool isConsumed() const A_WARN_UNUSED
+ bool isConsumed() const noexcept2 A_WARN_UNUSED
{ return mIsConsumed; }
protected:
diff --git a/src/events/keyevent.h b/src/events/keyevent.h
index 54ad54759..abde6b8ab 100644
--- a/src/events/keyevent.h
+++ b/src/events/keyevent.h
@@ -116,7 +116,7 @@ class KeyEvent: public InputGuiEvent
*
* @return The type of the event.
*/
- KeyEventTypeT getType() const A_WARN_UNUSED
+ KeyEventTypeT getType() const noexcept2 A_WARN_UNUSED
{ return mType; }
/**
@@ -124,10 +124,10 @@ class KeyEvent: public InputGuiEvent
*
* @return The key of the event.
*/
- const Key &getKey() const A_WARN_UNUSED
+ const Key &getKey() const noexcept2 A_WARN_UNUSED
{ return mKey; }
- InputActionT getActionId() const A_WARN_UNUSED
+ InputActionT getActionId() const noexcept2 A_WARN_UNUSED
{ return mActionId; }
#ifdef USE_SDL2
diff --git a/src/events/mouseevent.h b/src/events/mouseevent.h
index c2f1d93cd..36370c631 100644
--- a/src/events/mouseevent.h
+++ b/src/events/mouseevent.h
@@ -111,7 +111,7 @@ class MouseEvent: public InputGuiEvent
*
* @return The button of the mouse event.
*/
- MouseButtonT getButton() const A_WARN_UNUSED
+ MouseButtonT getButton() const noexcept2 A_WARN_UNUSED
{ return mButton; }
/**
@@ -122,7 +122,7 @@ class MouseEvent: public InputGuiEvent
* @return The x coordinate of the mouse event.
* @see Widget::addMouseListener, Widget::removeMouseListener
*/
- int getX() const A_WARN_UNUSED
+ int getX() const noexcept2 A_WARN_UNUSED
{ return mX; }
/**
@@ -133,7 +133,7 @@ class MouseEvent: public InputGuiEvent
* @return The y coordinate of the mouse event.
* @see Widget::addMouseListener, Widget::removeMouseListener
*/
- int getY() const A_WARN_UNUSED
+ int getY() const noexcept2 A_WARN_UNUSED
{ return mY; }
/**
@@ -142,7 +142,7 @@ class MouseEvent: public InputGuiEvent
*
* @return The number of clicks generated with the same button.
*/
- int getClickCount() const A_WARN_UNUSED
+ int getClickCount() const noexcept2 A_WARN_UNUSED
{ return mClickCount; }
/**
@@ -150,7 +150,7 @@ class MouseEvent: public InputGuiEvent
*
* @return The type of the event.
*/
- MouseEventTypeT getType() const A_WARN_UNUSED
+ MouseEventTypeT getType() const noexcept2 A_WARN_UNUSED
{ return mType; }
void setX(int n)
diff --git a/src/game.h b/src/game.h
index 1d5a0b9a8..ceebe1e09 100644
--- a/src/game.h
+++ b/src/game.h
@@ -92,10 +92,10 @@ class Game final
/**
* Returns the currently active map.
*/
- Map *getCurrentMap() const A_WARN_UNUSED
+ Map *getCurrentMap() const noexcept2 A_WARN_UNUSED
{ return mCurrentMap; }
- const std::string &getCurrentMapName() const A_WARN_UNUSED
+ const std::string &getCurrentMapName() const noexcept2 A_WARN_UNUSED
{ return mMapName; }
void setValidSpeed();
@@ -109,7 +109,7 @@ class Game final
static void videoResized(const int width, const int height);
- bool getValidSpeed() const A_WARN_UNUSED
+ bool getValidSpeed() const noexcept2 A_WARN_UNUSED
{ return mValidSpeed; }
static void moveInDirection(const unsigned char direction);
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index f61f3a1f3..ce54bb8c2 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -125,10 +125,10 @@ class GraphicsManager final
void updateLimits();
- int getMaxVertices() const A_WARN_UNUSED
+ int getMaxVertices() const noexcept2 A_WARN_UNUSED
{ return mMaxVertices; }
- bool getUseAtlases() const A_WARN_UNUSED
+ bool getUseAtlases() const noexcept2 A_WARN_UNUSED
{ return mUseAtlases; }
void logVersion() const;
@@ -144,7 +144,7 @@ class GraphicsManager final
void createTextureSampler();
- bool isUseTextureSampler() const A_WARN_UNUSED
+ bool isUseTextureSampler() const noexcept2 A_WARN_UNUSED
{ return mUseTextureSampler; }
static GLenum getLastError();
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 9a8e7b14f..953140518 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -150,7 +150,7 @@ class Gui final
*/
void videoResized() const;
- FocusHandler *getFocusHandler() const A_WARN_UNUSED
+ FocusHandler *getFocusHandler() const noexcept2 A_WARN_UNUSED
{ return mFocusHandler; }
/**
@@ -246,7 +246,7 @@ class Gui final
* @return The top widget. NULL if no top widget has been set.
* @since 0.1.0
*/
- Widget* getTop() const A_WARN_UNUSED
+ Widget* getTop() const noexcept2 A_WARN_UNUSED
{ return mTop; }
/**
diff --git a/src/gui/models/keylistmodel.h b/src/gui/models/keylistmodel.h
index 101307f30..ee21422f3 100644
--- a/src/gui/models/keylistmodel.h
+++ b/src/gui/models/keylistmodel.h
@@ -67,16 +67,16 @@ class KeyListModel final : public ListModel
void setElementAt(const int i, const std::string &caption)
{ setupActionData[mSelectedData][i].text = caption; }
- void setSize(const int size)
+ void setSize(const int size) noexcept2
{ mSize = size; }
- void setDataNum(const int num)
+ void setDataNum(const int num) noexcept2
{ mDataNum = num; }
- void setSelectedData(const int i)
+ void setSelectedData(const int i) noexcept2
{ mSelectedData = i; }
- int getSelectedData() const A_WARN_UNUSED
+ int getSelectedData() const noexcept2 A_WARN_UNUSED
{ return mSelectedData; }
private:
diff --git a/src/gui/models/namesmodel.h b/src/gui/models/namesmodel.h
index 63af17db6..f0362233d 100644
--- a/src/gui/models/namesmodel.h
+++ b/src/gui/models/namesmodel.h
@@ -40,10 +40,10 @@ class NamesModel notfinal : public ListModel
std::string getElementAt(int i) override final A_WARN_UNUSED;
- StringVect &getNames() A_WARN_UNUSED
+ StringVect &getNames() noexcept2 A_WARN_UNUSED
{ return mNames; }
- size_t size() const A_WARN_UNUSED
+ size_t size() const noexcept2 A_WARN_UNUSED
{ return mNames.size(); }
void clear()
diff --git a/src/gui/models/shopitems.h b/src/gui/models/shopitems.h
index cc72403b0..efc4fca79 100644
--- a/src/gui/models/shopitems.h
+++ b/src/gui/models/shopitems.h
@@ -96,7 +96,7 @@ class ShopItems final : public ListModel
int getNumberOfElements() override final A_WARN_UNUSED
{ return CAST_S32(mShopItems.size()); }
- bool empty() const A_WARN_UNUSED
+ bool empty() const noexcept2 A_WARN_UNUSED
{ return mShopItems.empty(); }
/**
diff --git a/src/gui/onlineplayer.h b/src/gui/onlineplayer.h
index 744e2d070..cbc58be8f 100644
--- a/src/gui/onlineplayer.h
+++ b/src/gui/onlineplayer.h
@@ -48,27 +48,27 @@ class OnlinePlayer final
A_DELETE_COPY(OnlinePlayer)
- const std::string getNick() const A_WARN_UNUSED
+ const std::string getNick() const noexcept2 A_WARN_UNUSED
{ return mNick; }
- unsigned char getStaus() const A_WARN_UNUSED
+ unsigned char getStaus() const noexcept2 A_WARN_UNUSED
{ return mStatus; }
void setIsGM(const bool b)
{ mIsGM = b; }
- char getVersion() const A_WARN_UNUSED
+ char getVersion() const noexcept2 A_WARN_UNUSED
{ return mVersion; }
- char getLevel() const A_WARN_UNUSED
+ char getLevel() const noexcept2 A_WARN_UNUSED
{ return mLevel; }
- const std::string getText() const A_WARN_UNUSED
+ const std::string getText() const noexcept2 A_WARN_UNUSED
{ return mText; }
void setText(std::string str);
- void setLevel(const char level)
+ void setLevel(const char level) noexcept2
{ mLevel = level; }
private:
diff --git a/src/gui/palette.h b/src/gui/palette.h
index 66dba9905..c94c3455d 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -139,7 +139,7 @@ class Palette notfinal
gradientIndex = rand();
}
- inline unsigned int getRGB() const A_WARN_UNUSED
+ inline unsigned int getRGB() const noexcept2 A_WARN_UNUSED
{
return (committedColor.r << 16) | (committedColor.g << 8) |
committedColor.b;
diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h
index fd083ba33..3d865389e 100644
--- a/src/gui/sdlinput.h
+++ b/src/gui/sdlinput.h
@@ -109,10 +109,10 @@ class SDLInput final
KeyInput dequeueKeyInput() A_WARN_UNUSED;
- bool isKeyQueueEmpty() const A_WARN_UNUSED
+ bool isKeyQueueEmpty() const noexcept2 A_WARN_UNUSED
{ return mKeyInputQueue.empty(); }
- bool isMouseQueueEmpty() const A_WARN_UNUSED
+ bool isMouseQueueEmpty() const noexcept2 A_WARN_UNUSED
{ return mMouseInputQueue.empty(); }
MouseInput dequeueMouseInput() A_WARN_UNUSED;
diff --git a/src/gui/shortcut/emoteshortcut.h b/src/gui/shortcut/emoteshortcut.h
index 6951ac9b3..f59ee3e18 100644
--- a/src/gui/shortcut/emoteshortcut.h
+++ b/src/gui/shortcut/emoteshortcut.h
@@ -66,7 +66,7 @@ class EmoteShortcut final
/**
* Returns the emote ID that is currently selected.
*/
- unsigned char getEmoteSelected() const A_WARN_UNUSED
+ unsigned char getEmoteSelected() const noexcept2 A_WARN_UNUSED
{ return mEmoteSelected; }
/**
@@ -97,7 +97,7 @@ class EmoteShortcut final
/**
* A flag to check if the Emote is selected.
*/
- bool isEmoteSelected() const A_WARN_UNUSED
+ bool isEmoteSelected() const noexcept2 A_WARN_UNUSED
{ return mEmoteSelected; }
/**
diff --git a/src/gui/shortcut/itemshortcut.h b/src/gui/shortcut/itemshortcut.h
index 4d7933b9f..1dd4640b2 100644
--- a/src/gui/shortcut/itemshortcut.h
+++ b/src/gui/shortcut/itemshortcut.h
@@ -89,7 +89,7 @@ class ItemShortcut final
/**
* Returns the item ID that is currently selected.
*/
- int getItemSelected() const A_WARN_UNUSED
+ int getItemSelected() const noexcept2 A_WARN_UNUSED
{ return mItemSelected; }
/**
@@ -127,13 +127,13 @@ class ItemShortcut final
/**
* Returns selected shortcut item ID.
*/
- int getSelectedItem() const A_WARN_UNUSED
+ int getSelectedItem() const noexcept2 A_WARN_UNUSED
{ return mItemSelected; }
/**
* A flag to check if the item is selected.
*/
- bool isItemSelected() const A_WARN_UNUSED
+ bool isItemSelected() const noexcept2 A_WARN_UNUSED
{ return mItemSelected > -1; }
/**
diff --git a/src/gui/shortcut/shortcutbase.h b/src/gui/shortcut/shortcutbase.h
index 8f68d5a69..995c29121 100644
--- a/src/gui/shortcut/shortcutbase.h
+++ b/src/gui/shortcut/shortcutbase.h
@@ -75,13 +75,13 @@ class ShortcutBase notfinal
/**
* Returns the amount of shortcut items.
*/
- int getItemCount() const A_WARN_UNUSED
+ int getItemCount() const noexcept2 A_WARN_UNUSED
{ return mMaxSize; }
/**
* Returns the item ID that is currently selected.
*/
- int getItemSelected() const A_WARN_UNUSED
+ int getItemSelected() const noexcept2 A_WARN_UNUSED
{ return mItemSelected; }
/**
@@ -115,7 +115,7 @@ class ShortcutBase notfinal
/**
* A flag to check if the item is selected.
*/
- bool isItemSelected() const A_WARN_UNUSED
+ bool isItemSelected() const noexcept2 A_WARN_UNUSED
{ return mItemSelected > -1; }
/**
diff --git a/src/gui/shortcut/spellshortcut.h b/src/gui/shortcut/spellshortcut.h
index fda7d46f1..fca419c61 100644
--- a/src/gui/shortcut/spellshortcut.h
+++ b/src/gui/shortcut/spellshortcut.h
@@ -55,19 +55,19 @@ class SpellShortcut final
*
* @param itemId The ID of the item that is to be assigned.
*/
- void setItemSelected(const int itemId)
+ void setItemSelected(const int itemId) noexcept2
{ mItemSelected = itemId; }
/**
* A flag to check if the item is selected.
*/
- bool isItemSelected() const A_WARN_UNUSED
+ bool isItemSelected() const noexcept2 A_WARN_UNUSED
{ return mItemSelected > -1; }
/**
* Returns selected shortcut item ID.
*/
- int getSelectedItem() const A_WARN_UNUSED
+ int getSelectedItem() const noexcept2 A_WARN_UNUSED
{ return mItemSelected; }
/**
diff --git a/src/gui/skin.h b/src/gui/skin.h
index bcfaf77fc..a0b33fe53 100644
--- a/src/gui/skin.h
+++ b/src/gui/skin.h
@@ -52,31 +52,31 @@ class Skin final
* name if a dialog for skin selection for a specific window type is
* done.
*/
- const std::string &getName() const A_WARN_UNUSED
+ const std::string &getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
/**
* Returns the skin's xml file path.
*/
- const std::string &getFilePath() const A_WARN_UNUSED
+ const std::string &getFilePath() const noexcept2 A_WARN_UNUSED
{ return mFilePath; }
/**
* Returns the background skin.
*/
- const ImageRect &getBorder() const A_WARN_UNUSED
+ const ImageRect &getBorder() const noexcept2 A_WARN_UNUSED
{ return *mBorder; }
/**
* Returns the image used by a close button for this skin.
*/
- const Image *getCloseImage(const bool state) const A_WARN_UNUSED
+ const Image *getCloseImage(const bool state) const noexcept2 A_WARN_UNUSED
{ return state ? mCloseImageHighlighted : mCloseImage; }
/**
* Returns the image used by a sticky button for this skin.
*/
- const Image *getStickyImage(const bool state) const A_WARN_UNUSED
+ const Image *getStickyImage(const bool state) const noexcept2 A_WARN_UNUSED
{ return state ? mStickyImageDown : mStickyImageUp; }
/**
@@ -94,10 +94,10 @@ class Skin final
*/
void updateAlpha(const float minimumOpacityAllowed = 0.0F);
- int getPadding() const A_WARN_UNUSED
+ int getPadding() const noexcept2 A_WARN_UNUSED
{ return mPadding; }
- int getTitlePadding() const A_WARN_UNUSED
+ int getTitlePadding() const noexcept2 A_WARN_UNUSED
{ return mTitlePadding; }
int getOption(const std::string &name) const A_WARN_UNUSED
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 43d0c3308..f8428f86e 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -121,7 +121,7 @@ class Theme final : public Palette,
/**
* Get the minimum opacity allowed to skins.
*/
- float getMinimumOpacity() const A_WARN_UNUSED
+ float getMinimumOpacity() const noexcept2 A_WARN_UNUSED
{ return mMinimumOpacity; }
/**
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index cbe48c7c4..c063742a2 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -122,13 +122,13 @@ class Viewport final : public WindowContainer,
/**
* Returns camera x offset in pixels.
*/
- int getCameraX() const A_WARN_UNUSED
+ int getCameraX() const noexcept2 A_WARN_UNUSED
{ return mPixelViewX; }
/**
* Returns camera y offset in pixels.
*/
- int getCameraY() const A_WARN_UNUSED
+ int getCameraY() const noexcept2 A_WARN_UNUSED
{ return mPixelViewY; }
/**
@@ -142,15 +142,15 @@ class Viewport final : public WindowContainer,
*/
void cleanHoverItems();
- Map *getMap() const A_WARN_UNUSED
+ Map *getMap() const noexcept2 A_WARN_UNUSED
{ return mMap; }
void moveCamera(const int dx, const int dy);
- int getCameraRelativeX() const A_WARN_UNUSED
+ int getCameraRelativeX() const noexcept2 A_WARN_UNUSED
{ return mCameraRelativeX; }
- int getCameraRelativeY() const A_WARN_UNUSED
+ int getCameraRelativeY() const noexcept2 A_WARN_UNUSED
{ return mCameraRelativeY; }
void setCameraRelativeX(const int n)
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index c578c2633..e863a2be8 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -166,36 +166,36 @@ class BrowserBox final : public Widget,
typedef std::list<std::string> TextRows;
- TextRows &getRows() A_WARN_UNUSED
+ TextRows &getRows() noexcept2 A_WARN_UNUSED
{ return mTextRows; }
- bool hasRows() const A_WARN_UNUSED
+ bool hasRows() const noexcept2 A_WARN_UNUSED
{ return !mTextRows.empty(); }
- void setAlwaysUpdate(const bool n)
+ void setAlwaysUpdate(const bool n) noexcept2
{ mAlwaysUpdate = n; }
- void setProcessVars(const bool n)
+ void setProcessVars(const bool n) noexcept2
{ mProcessVars = n; }
- void setEnableImages(const bool n)
+ void setEnableImages(const bool n) noexcept2
{ mEnableImages = n; }
- void setEnableKeys(const bool n)
+ void setEnableKeys(const bool n) noexcept2
{ mEnableKeys = n; }
- void setEnableTabs(const bool n)
+ void setEnableTabs(const bool n) noexcept2
{ mEnableTabs = n; }
std::string getTextAtPos(const int x, const int y) const A_WARN_UNUSED;
- int getPadding() const A_WARN_UNUSED
+ int getPadding() const noexcept2 A_WARN_UNUSED
{ return mPadding; }
void setForegroundColorAll(const Color &color1,
const Color &color2);
- unsigned int getDataWidth() const A_WARN_UNUSED
+ unsigned int getDataWidth() const noexcept2 A_WARN_UNUSED
{ return mDataWidth; }
void moveSelectionUp();
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 2e20be616..aaeedd553 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -167,16 +167,16 @@ class Button final : public Widget,
void setDescription(const std::string &text)
{ mDescription = text; }
- std::string getDescription() const A_WARN_UNUSED
+ std::string getDescription() const noexcept2 A_WARN_UNUSED
{ return mDescription; }
- int getClickCount() const A_WARN_UNUSED
+ int getClickCount() const noexcept2 A_WARN_UNUSED
{ return mClickCount; }
void setTag(int tag)
{ mTag = tag; }
- int getTag() const A_WARN_UNUSED
+ int getTag() const noexcept2 A_WARN_UNUSED
{ return mTag; }
void setStick(bool b)
@@ -219,7 +219,7 @@ class Button final : public Widget,
*
* @return The caption of the button.
*/
- const std::string& getCaption() const
+ const std::string& getCaption() const noexcept2 A_WARN_UNUSED
{ return mCaption; }
/**
@@ -229,7 +229,7 @@ class Button final : public Widget,
* @param alignment The alignment of the caption.
* @see getAlignment, Graphics
*/
- void setAlignment(Graphics::Alignment alignment)
+ void setAlignment(Graphics::Alignment alignment) noexcept2
{ mAlignment = alignment; }
/**
@@ -238,7 +238,7 @@ class Button final : public Widget,
* @return The alignment of the caption.
* @see setAlignment, Graphics
*/
- Graphics::Alignment getAlignment() const
+ Graphics::Alignment getAlignment() const noexcept2 A_WARN_UNUSED
{ return mAlignment; }
void focusLost(const Event& event) override final;
@@ -255,10 +255,10 @@ class Button final : public Widget,
void setWindow(Widget *const widget) override final;
- void setImageWidth(const int width)
+ void setImageWidth(const int width) noexcept2
{ mImageWidth = width; }
- void setImageHeight(const int height)
+ void setImageHeight(const int height) noexcept2
{ mImageHeight = height; }
enum
diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h
index 5e47af759..feb7f1b82 100644
--- a/src/gui/widgets/flowcontainer.h
+++ b/src/gui/widgets/flowcontainer.h
@@ -58,10 +58,10 @@ class FlowContainer final : public Container,
*/
void widgetResized(const Event &event) override final;
- int getBoxWidth() const A_WARN_UNUSED
+ int getBoxWidth() const noexcept2 A_WARN_UNUSED
{ return mBoxWidth; }
- int getBoxHeight() const A_WARN_UNUSED
+ int getBoxHeight() const noexcept2 A_WARN_UNUSED
{ return mBoxHeight; }
void add(Widget *const widget) override final;
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index c42ac7ff5..9849a2913 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -87,7 +87,7 @@ class GuiTable final : public Widget,
void setSelectedColumn(const int selected);
- bool isWrappingEnabled() const A_WARN_UNUSED
+ bool isWrappingEnabled() const noexcept2 A_WARN_UNUSED
{ return mWrappingEnabled; }
void setWrappingEnabled(bool wrappingEnabled)
@@ -142,7 +142,7 @@ class GuiTable final : public Widget,
*
* @return True if the table is opaque, false otherwise.
*/
- bool isOpaque() const A_WARN_UNUSED
+ bool isOpaque() const noexcept2 A_WARN_UNUSED
{ return mOpaque == Opaque_true; }
// Inherited from MouseListener
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index 5e7d1564f..ce471aa29 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -60,7 +60,7 @@ class Icon final : public Widget
/**
* Gets the current Image.
*/
- Image *getImage() const A_WARN_UNUSED
+ Image *getImage() const noexcept2 A_WARN_UNUSED
{ return mImage; }
/**
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 006644425..b1a9c30da 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -133,13 +133,13 @@ class ItemContainer final : public Widget,
void updateMatrix();
- bool getClickCount() const A_WARN_UNUSED
+ bool getClickCount() const noexcept2 A_WARN_UNUSED
{ return mClicks; }
- void unsetInventory()
+ void unsetInventory() noexcept2
{ mInventory = nullptr; }
- void setInventory(Inventory *const inventory)
+ void setInventory(Inventory *const inventory) noexcept2
{ mInventory = inventory; }
void setCellBackgroundImage(const std::string &xmlName);
diff --git a/src/gui/widgets/layoutcell.h b/src/gui/widgets/layoutcell.h
index 2fc174ec6..05da6e934 100644
--- a/src/gui/widgets/layoutcell.h
+++ b/src/gui/widgets/layoutcell.h
@@ -123,16 +123,16 @@ class LayoutCell notfinal
void setType(int t)
{ mType = t; }
- int getWidth() const A_WARN_UNUSED
+ int getWidth() const noexcept2 A_WARN_UNUSED
{ return mExtent[0]; }
- int getHeight() const A_WARN_UNUSED
+ int getHeight() const noexcept2 A_WARN_UNUSED
{ return mExtent[1]; }
- void setWidth(const int w)
+ void setWidth(const int w) noexcept2
{ mExtent[0] = w; }
- void setHeight(const int h)
+ void setHeight(const int h) noexcept2
{ mExtent[1] = h; }
enum
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index 97ee63ba7..423015e92 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -137,7 +137,7 @@ class ListBox notfinal : public Widget,
void refocus();
- void setDistributeMousePressed(const bool b)
+ void setDistributeMousePressed(const bool b) noexcept2
{ mDistributeMousePressed = b; }
virtual void adjustSize();
@@ -146,16 +146,16 @@ class ListBox notfinal : public Widget,
virtual int getSelectionByMouse(const int y) const;
- void setCenter(const bool b)
+ void setCenter(const bool b) noexcept2
{ mCenterText = b; }
- int getPressedIndex() const
+ int getPressedIndex() const noexcept2 A_WARN_UNUSED
{ return mPressedIndex; }
virtual unsigned int getRowHeight() const A_WARN_UNUSED
{ return mRowHeight; }
- void setRowHeight(unsigned int n)
+ void setRowHeight(unsigned int n) noexcept2
{ mRowHeight = n; }
/**
@@ -164,7 +164,7 @@ class ListBox notfinal : public Widget,
* @return the selected item as an index in the list model.
* @see setSelected
*/
- int getSelected() const
+ int getSelected() const noexcept2 A_WARN_UNUSED
{ return mSelected; }
/**
@@ -190,7 +190,7 @@ class ListBox notfinal : public Widget,
* @return the list model used.
* @see setListModel
*/
- ListModel *getListModel() const
+ ListModel *getListModel() const noexcept2 A_WARN_UNUSED
{ return mListModel; }
/**
@@ -205,7 +205,7 @@ class ListBox notfinal : public Widget,
* @return true if wrapping is enabled, fasle otherwise.
* @see setWrappingEnabled
*/
- bool isWrappingEnabled() const
+ bool isWrappingEnabled() const noexcept2 A_WARN_UNUSED
{ return mWrappingEnabled; }
/**
@@ -219,7 +219,7 @@ class ListBox notfinal : public Widget,
*
* @see isWrappingEnabled
*/
- void setWrappingEnabled(const bool wrappingEnabled)
+ void setWrappingEnabled(const bool wrappingEnabled) noexcept2
{ mWrappingEnabled = wrappingEnabled; }
/**
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h
index bf09e4a51..17daa6940 100644
--- a/src/gui/widgets/popup.h
+++ b/src/gui/widgets/popup.h
@@ -97,7 +97,7 @@ class Popup notfinal : public Container,
*/
void setMinWidth(const int width);
- int getMinWidth() const A_WARN_UNUSED
+ int getMinWidth() const noexcept2 A_WARN_UNUSED
{ return mMinWidth; }
/**
@@ -105,7 +105,7 @@ class Popup notfinal : public Container,
*/
void setMinHeight(const int height);
- int getMinHeight() const A_WARN_UNUSED
+ int getMinHeight() const noexcept2 A_WARN_UNUSED
{ return mMinHeight; }
/**
@@ -113,7 +113,7 @@ class Popup notfinal : public Container,
*/
void setMaxWidth(const int width);
- int getMaxWidth() const A_WARN_UNUSED
+ int getMaxWidth() const noexcept2 A_WARN_UNUSED
{ return mMaxWidth; }
/**
@@ -121,7 +121,7 @@ class Popup notfinal : public Container,
*/
void setMaxHeight(const int height);
- int getMaxHeight() const A_WARN_UNUSED
+ int getMaxHeight() const noexcept2 A_WARN_UNUSED
{ return mMaxHeight; }
/**
@@ -131,19 +131,19 @@ class Popup notfinal : public Container,
* @return The padding of the popup.
* @see setPadding
*/
- int getPadding() const A_WARN_UNUSED
+ int getPadding() const noexcept2 A_WARN_UNUSED
{ return mPadding; }
- void setPadding(int padding)
+ void setPadding(int padding) noexcept2
{ mPadding = padding; }
/**
* Sets the name of the popup. This is only useful for debug purposes.
*/
- void setPopupName(const std::string &name)
+ void setPopupName(const std::string &name) noexcept2
{ mPopupName = name; }
- const std::string &getPopupName() const
+ const std::string &getPopupName() const noexcept2
{ return mPopupName; }
/**
@@ -170,7 +170,7 @@ class Popup notfinal : public Container,
void widgetMoved(const Event &event) override final;
- bool isPopupVisible() const
+ bool isPopupVisible() const noexcept2
{ return mVisible == Visible_true; }
void postInit() override
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 289633f3d..92814a3c7 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -85,7 +85,7 @@ class ProgressBar final : public Widget,
/**
* Returns the current progress.
*/
- float getProgress() const A_WARN_UNUSED
+ float getProgress() const noexcept2 A_WARN_UNUSED
{ return mProgress; }
/**
@@ -104,7 +104,7 @@ class ProgressBar final : public Widget,
/**
* Returns the color of the progress bar.
*/
- const Color &getBackgroundColor() const A_WARN_UNUSED
+ const Color &getBackgroundColor() const noexcept2 A_WARN_UNUSED
{ return mBackgroundColor; }
/**
@@ -115,19 +115,19 @@ class ProgressBar final : public Widget,
/**
* Returns the text shown on the progress bar.
*/
- const std::string &text() const A_WARN_UNUSED
+ const std::string &text() const noexcept2 A_WARN_UNUSED
{ return mText; }
/**
* Set whether the progress is moved smoothly.
*/
- void setSmoothProgress(bool smoothProgress)
+ void setSmoothProgress(bool smoothProgress) noexcept2
{ mSmoothProgress = smoothProgress; }
/**
* Set whether the color changing is made smoothly.
*/
- void setSmoothColorChange(bool smoothColorChange)
+ void setSmoothColorChange(bool smoothColorChange) noexcept2
{ mSmoothColorChange = smoothColorChange; }
void widgetResized(const Event &event) override final;
@@ -136,7 +136,7 @@ class ProgressBar final : public Widget,
void widgetHidden(const Event &event) override final;
- void setPadding(unsigned int padding)
+ void setPadding(unsigned int padding) noexcept2
{ mPadding = padding; }
private:
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 6ec9d73d7..3a75d592c 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -1449,7 +1449,7 @@ void ScrollArea::checkPolicies()
}
}
-bool ScrollArea::isSelectable() const
+bool ScrollArea::isSelectable() const noexcept2
{
if (mVBarVisible || mHBarVisible)
return true;
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 351814b79..0738843cb 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -159,7 +159,7 @@ class ScrollArea final : public BasicContainer,
/**
* Returns whether the widget draws its background or not.
*/
- bool isOpaque() const A_WARN_UNUSED
+ bool isOpaque() const noexcept2 A_WARN_UNUSED
{ return mOpaque == Opaque_true; }
/**
@@ -432,7 +432,7 @@ class ScrollArea final : public BasicContainer,
void mouseWheelMovedDown(MouseEvent& event) override final;
- bool isSelectable() const override final;
+ bool isSelectable() const noexcept2 override final A_WARN_UNUSED;
protected:
enum BUTTON_DIR
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index c7bea7af7..130883886 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -74,7 +74,7 @@ class SetupItem notfinal : public ActionListener,
void setWidget(Widget *widget)
{ mWidget = widget; }
- Widget *getWidget() const A_WARN_UNUSED
+ Widget *getWidget() const noexcept2 A_WARN_UNUSED
{ return mWidget; }
Configuration *getConfig() const RETURNS_NONNULL A_WARN_UNUSED;
@@ -93,20 +93,20 @@ class SetupItem notfinal : public ActionListener,
virtual void externalUnloaded(const std::string &eventName) A_CONST;
- MainConfig isMainConfig() const A_WARN_UNUSED
+ MainConfig isMainConfig() const noexcept2 A_WARN_UNUSED
{ return mMainConfig; }
void fixFirstItemSize(Widget *const widget);
virtual void rereadValue();
- void setValue(const std::string &str)
+ void setValue(const std::string &str) noexcept2
{ mValue = str; }
- std::string getValue() const
+ std::string getValue() const noexcept2
{ return mValue; }
- std::string getEventName() const
+ std::string getEventName() const noexcept2
{ return mEventName; }
protected:
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h
index d56f74f6f..bdc679dc7 100644
--- a/src/gui/widgets/shortcutcontainer.h
+++ b/src/gui/widgets/shortcutcontainer.h
@@ -77,13 +77,13 @@ class ShortcutContainer notfinal : public Widget,
{
}
- int getMaxItems() const A_WARN_UNUSED
+ int getMaxItems() const noexcept2 A_WARN_UNUSED
{ return mMaxItems; }
- int getBoxWidth() const A_WARN_UNUSED
+ int getBoxWidth() const noexcept2 A_WARN_UNUSED
{ return mBoxWidth; }
- int getBoxHeight() const A_WARN_UNUSED
+ int getBoxHeight() const noexcept2 A_WARN_UNUSED
{ return mBoxHeight; }
void drawBackground(Graphics *const g) A_NONNULL(2);
diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h
index 622fa95dc..d27ad0585 100644
--- a/src/gui/widgets/sliderlist.h
+++ b/src/gui/widgets/sliderlist.h
@@ -69,7 +69,7 @@ class SliderList final : public Container,
void adjustSize();
- int getSelected() const A_WARN_UNUSED
+ int getSelected() const noexcept2 A_WARN_UNUSED
{ return mSelectedIndex; }
protected:
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 840dd84c6..6d8bc84d2 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -162,7 +162,7 @@ class TabbedArea final : public ActionListener,
*/
void logic() override final;
- int getContainerHeight() const A_WARN_UNUSED
+ int getContainerHeight() const noexcept2 A_WARN_UNUSED
{ return mWidgetContainer->getHeight(); }
void setSelectedTab(Tab *const tab);
@@ -171,13 +171,13 @@ class TabbedArea final : public ActionListener,
int getSelectedTabIndex() const A_WARN_UNUSED;
- Tab* getSelectedTab() const A_WARN_UNUSED
+ Tab* getSelectedTab() const noexcept2 A_WARN_UNUSED
{ return mSelectedTab; }
void setOpaque(const Opaque opaque)
{ mOpaque = opaque; }
- bool isOpaque() const A_WARN_UNUSED
+ bool isOpaque() const noexcept2 A_WARN_UNUSED
{ return mOpaque == Opaque_true; }
void adjustSize();
@@ -201,21 +201,21 @@ class TabbedArea final : public ActionListener,
void enableScrollButtons(const bool enable);
- void setRightMargin(const int n)
+ void setRightMargin(const int n) noexcept2
{ mRightMargin = n; }
- int getRightMargin() const A_WARN_UNUSED
+ int getRightMargin() const noexcept2 A_WARN_UNUSED
{ return mRightMargin; }
- void setFollowDownScroll(const bool n)
+ void setFollowDownScroll(const bool n) noexcept2
{ mFollowDownScroll = n; }
- bool getFollowDownScroll() const A_WARN_UNUSED
+ bool getFollowDownScroll() const noexcept2 A_WARN_UNUSED
{ return mFollowDownScroll; }
void keyPressed(KeyEvent& event) override final;
- void setBlockSwitching(const bool b)
+ void setBlockSwitching(const bool b) noexcept2
{ mBlockSwitching = b; }
void setWidth(int width);
@@ -228,7 +228,7 @@ class TabbedArea final : public ActionListener,
void death(const Event &event) override final;
- void setResizeHeight(bool b)
+ void setResizeHeight(bool b) noexcept2
{ mResizeHeight = b; }
void adjustWidget(Widget *const widget) const;
@@ -237,10 +237,10 @@ class TabbedArea final : public ActionListener,
void selectPrevTab();
- Widget *getTabContainer() const
+ Widget *getTabContainer() const noexcept2 A_WARN_UNUSED
{ return mTabContainer; }
- Widget *getWidgetContainer() const
+ Widget *getWidgetContainer() const noexcept2 A_WARN_UNUSED
{ return mWidgetContainer; }
private:
diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h
index b1a988a8e..c14f5dafb 100644
--- a/src/gui/widgets/tabs/chat/chattab.h
+++ b/src/gui/widgets/tabs/chat/chattab.h
@@ -138,7 +138,7 @@ class ChatTab notfinal : public Tab
/**
* Returns type of the being.
*/
- ChatTabTypeT getType() const A_WARN_UNUSED
+ ChatTabTypeT getType() const noexcept2 A_WARN_UNUSED
{ return mType; }
void saveToLogFile(const std::string &msg) const;
@@ -151,22 +151,22 @@ class ChatTab notfinal : public Tab
void loadFromLogFile(const std::string &name);
- bool getAllowHighlight() const A_WARN_UNUSED
+ bool getAllowHighlight() const noexcept2 A_WARN_UNUSED
{ return mAllowHightlight; }
- void setAllowHighlight(const bool n)
+ void setAllowHighlight(const bool n) noexcept2
{ mAllowHightlight = n; }
- bool getRemoveNames() const A_WARN_UNUSED
+ bool getRemoveNames() const noexcept2 A_WARN_UNUSED
{ return mRemoveNames; }
- void setRemoveNames(const bool n)
+ void setRemoveNames(const bool n) noexcept2
{ mRemoveNames = n; }
- bool getNoAway() const A_WARN_UNUSED
+ bool getNoAway() const noexcept2 A_WARN_UNUSED
{ return mNoAway; }
- void setNoAway(const bool n)
+ void setNoAway(const bool n) noexcept2
{ mNoAway = n; }
void addNewRow(std::string &line);
diff --git a/src/gui/widgets/tabs/chat/whispertab.h b/src/gui/widgets/tabs/chat/whispertab.h
index f298bf164..58fc1515d 100644
--- a/src/gui/widgets/tabs/chat/whispertab.h
+++ b/src/gui/widgets/tabs/chat/whispertab.h
@@ -33,7 +33,7 @@ class WhisperTab final : public ChatTab
public:
A_DELETE_COPY(WhisperTab)
- const std::string &getNick() const A_WARN_UNUSED
+ const std::string &getNick() const noexcept2 A_WARN_UNUSED
{ return mNick; }
bool handleCommand(const std::string &restrict type,
diff --git a/src/gui/widgets/tabs/setuptab.h b/src/gui/widgets/tabs/setuptab.h
index 9eadd6537..6d23bfe62 100644
--- a/src/gui/widgets/tabs/setuptab.h
+++ b/src/gui/widgets/tabs/setuptab.h
@@ -40,7 +40,7 @@ class SetupTab notfinal : public Container,
public:
A_DELETE_COPY(SetupTab)
- const std::string &getName() const A_WARN_UNUSED
+ const std::string &getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
/**
@@ -64,7 +64,7 @@ class SetupTab notfinal : public Container,
* Sets the name displayed on the tab. Should be set in the
* constructor of a subclass.
*/
- void setName(const std::string &name)
+ void setName(const std::string &name) noexcept2
{ mName = name; }
private:
diff --git a/src/gui/widgets/tabs/setuptabscroll.h b/src/gui/widgets/tabs/setuptabscroll.h
index 30e771c05..9ac14b072 100644
--- a/src/gui/widgets/tabs/setuptabscroll.h
+++ b/src/gui/widgets/tabs/setuptabscroll.h
@@ -42,7 +42,7 @@ class SetupTabScroll notfinal : public SetupTab
void addControl(SetupItem *const widget, const std::string &event);
- VertContainer *getContainer() const A_WARN_UNUSED
+ VertContainer *getContainer() const noexcept2 A_WARN_UNUSED
{ return mContainer; }
void apply() override;
@@ -56,7 +56,7 @@ class SetupTabScroll notfinal : public SetupTab
void action(const ActionEvent &event A_UNUSED) override final
{ }
- int getPreferredFirstItemSize() const A_WARN_UNUSED
+ int getPreferredFirstItemSize() const noexcept2 A_WARN_UNUSED
{ return mPreferredFirstItemSize; }
void widgetResized(const Event &event) override final;
@@ -65,7 +65,7 @@ class SetupTabScroll notfinal : public SetupTab
void clear() override final;
- const std::set<SetupItem*> &getAllItems() const
+ const std::set<SetupItem*> &getAllItems() const noexcept2
{ return mAllItems; }
protected:
diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h
index 042d0e0a8..a64f6e39a 100644
--- a/src/gui/widgets/tabs/tab.h
+++ b/src/gui/widgets/tabs/tab.h
@@ -174,7 +174,7 @@ class Tab notfinal : public BasicContainer,
void setFlash(const int flash)
{ mFlash = flash; mRedraw = true; }
- int getFlash() const A_WARN_UNUSED
+ int getFlash() const noexcept2 A_WARN_UNUSED
{ return mFlash; }
void widgetResized(const Event &event) override final;
@@ -183,7 +183,7 @@ class Tab notfinal : public BasicContainer,
void setLabelFont(Font *const font);
- Label *getLabel() const A_WARN_UNUSED
+ Label *getLabel() const noexcept2 A_WARN_UNUSED
{ return mLabel; }
void adjustSize();
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 097c772b8..c0f8b9da6 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -104,7 +104,7 @@ class TextBox final : public Widget,
/**
* Get the minimum text width for the text box.
*/
- int getMinWidth() const A_WARN_UNUSED
+ int getMinWidth() const noexcept2 A_WARN_UNUSED
{ return mMinWidth; }
void keyPressed(KeyEvent& event) override final;
@@ -259,7 +259,7 @@ class TextBox final : public Widget,
* @return True if the text box is opaque, false otherwise.
* @see setOpaque
*/
- bool isOpaque() const
+ bool isOpaque() const noexcept2
{ return mOpaque == Opaque_true; }
/**
@@ -270,7 +270,7 @@ class TextBox final : public Widget,
* @param opaque True if the text box should be opaque, false otherwise.
* @see isOpaque
*/
- void setOpaque(const Opaque opaque)
+ void setOpaque(const Opaque opaque) noexcept2
{ mOpaque = opaque; }
void fontChanged() override final
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index 359d54971..263533c54 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -164,7 +164,7 @@ class TextField notfinal : public Widget,
*/
int getValue() const A_WARN_UNUSED;
- void setSendAlwaysEvents(const bool b)
+ void setSendAlwaysEvents(const bool b) noexcept2
{ mSendAlwaysEvents = b; }
void adjustSize();
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index ccd552a57..5a2eaa441 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -112,14 +112,14 @@ class TextPreview final : public Widget
*
* @param opaque Whether the widget should be opaque or not
*/
- void setOpaque(const Opaque opaque)
+ void setOpaque(const Opaque opaque) noexcept2
{ mOpaque = opaque; }
/**
* Gets opacity for this widget (whether or not the background color
* is shown below the widget)
*/
- bool isOpaque() const A_WARN_UNUSED
+ bool isOpaque() const noexcept2 A_WARN_UNUSED
{ return mOpaque == Opaque_true; }
void adjustSize();
diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h
index cbeb68874..f1bf4e63f 100644
--- a/src/gui/widgets/widget.h
+++ b/src/gui/widgets/widget.h
@@ -226,7 +226,7 @@ class Widget notfinal : public Widget2
* setDimension, getDimension
* @since 0.1.0
*/
- int getWidth() const A_WARN_UNUSED
+ int getWidth() const noexcept2 A_WARN_UNUSED
{ return mDimension.width; }
/**
@@ -247,7 +247,7 @@ class Widget notfinal : public Widget2
* setDimension, getDimension
* @since 0.1.0
*/
- int getHeight() const A_WARN_UNUSED
+ int getHeight() const noexcept2 A_WARN_UNUSED
{ return mDimension.height; }
/**
@@ -279,7 +279,7 @@ class Widget notfinal : public Widget2
* @see setX, setY, getY, setPosition, setDimension, getDimension
* @since 0.1.0
*/
- int getX() const A_WARN_UNUSED
+ int getX() const noexcept2 A_WARN_UNUSED
{ return mDimension.x; }
/**
@@ -300,7 +300,7 @@ class Widget notfinal : public Widget2
* @see setY, setX, getX, setPosition, setDimension, getDimension
* @since 0.1.0
*/
- int getY() const A_WARN_UNUSED
+ int getY() const noexcept2 A_WARN_UNUSED
{ return mDimension.y; }
/**
@@ -1023,10 +1023,10 @@ class Widget notfinal : public Widget2
void setRedraw(const bool b) noexcept2
{ mRedraw = b; }
- virtual bool isSelectable() const A_WARN_UNUSED
+ virtual bool isSelectable() const noexcept2 A_WARN_UNUSED
{ return mSelectable; }
- void setSelectable(const bool selectable)
+ void setSelectable(const bool selectable) noexcept2
{ mSelectable = selectable; }
static void distributeWindowResizeEvent();
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index 77af3d216..5a7ad3d53 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -82,12 +82,12 @@ class Widget2 notfinal
}
}
- void setForegroundColor2(const Color &color)
+ void setForegroundColor2(const Color &color) noexcept2
{
mForegroundColor2 = color;
}
- Widget* getWindow() const A_WARN_UNUSED
+ Widget* getWindow() const noexcept2 A_WARN_UNUSED
{
return mWindow;
}
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index bc77264a2..61e6429e1 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -181,13 +181,13 @@ class Window notfinal : public BasicContainer2,
*/
void setCloseButton(const bool flag);
- bool getCloseButton() const A_WARN_UNUSED
+ bool getCloseButton() const noexcept2 A_WARN_UNUSED
{ return mCloseWindowButton; }
void setAllowClose(const bool b)
{ mAllowClose = b; }
- bool getAlowClose() const A_WARN_UNUSED
+ bool getAlowClose() const noexcept2 A_WARN_UNUSED
{ return mCloseWindowButton || mAllowClose; }
/**
@@ -200,7 +200,7 @@ class Window notfinal : public BasicContainer2,
*/
void setMinWidth(const int width);
- int getMinWidth() const A_WARN_UNUSED
+ int getMinWidth() const noexcept2 A_WARN_UNUSED
{ return mMinWinWidth; }
/**
@@ -208,7 +208,7 @@ class Window notfinal : public BasicContainer2,
*/
void setMinHeight(const int height);
- int getMinHeight() const A_WARN_UNUSED
+ int getMinHeight() const noexcept2 A_WARN_UNUSED
{ return mMinWinHeight; }
/**
@@ -216,7 +216,7 @@ class Window notfinal : public BasicContainer2,
*/
void setMaxWidth(const int width);
- int getMaxWidth() const A_WARN_UNUSED
+ int getMaxWidth() const noexcept2 A_WARN_UNUSED
{ return mMaxWinWidth; }
/**
@@ -224,7 +224,7 @@ class Window notfinal : public BasicContainer2,
*/
void setMaxHeight(const int height);
- int getMaxHeight() const A_WARN_UNUSED
+ int getMaxHeight() const noexcept2 A_WARN_UNUSED
{ return mMaxWinHeight; }
/**
@@ -248,7 +248,7 @@ class Window notfinal : public BasicContainer2,
/**
* Returns whether the window is sticky.
*/
- bool isSticky() const A_WARN_UNUSED
+ bool isSticky() const noexcept2 A_WARN_UNUSED
{ return mSticky; }
/**
@@ -259,7 +259,7 @@ class Window notfinal : public BasicContainer2,
/**
* Returns whether the window sticky locking window.
*/
- bool isStickyButtonLock() const A_WARN_UNUSED
+ bool isStickyButtonLock() const noexcept2 A_WARN_UNUSED
{ return mStickyButtonLock; }
/**
@@ -277,7 +277,7 @@ class Window notfinal : public BasicContainer2,
/**
* Returns whether the window is visible by default.
*/
- bool isDefaultVisible() const A_WARN_UNUSED
+ bool isDefaultVisible() const noexcept2 A_WARN_UNUSED
{ return mDefaultVisible; }
/**
@@ -357,7 +357,7 @@ class Window notfinal : public BasicContainer2,
/**
* Returns the name of the window. This is not the window title.
*/
- const std::string &getWindowName() const A_WARN_UNUSED
+ const std::string &getWindowName() const noexcept2 A_WARN_UNUSED
{ return mWindowName; }
/**
@@ -474,7 +474,7 @@ class Window notfinal : public BasicContainer2,
void enableVisibleSound(bool b)
{ mPlayVisibleSound = b; }
- bool isWindowVisible() const A_WARN_UNUSED
+ bool isWindowVisible() const noexcept2 A_WARN_UNUSED
{ return mVisible == Visible_true; }
/**
@@ -589,10 +589,10 @@ class Window notfinal : public BasicContainer2,
bool getOptionBool(const std::string &name,
const bool def = false) const A_WARN_UNUSED;
- void setTitlePadding(const int p)
+ void setTitlePadding(const int p) noexcept2
{ mTitlePadding = p; }
- int getTitlePadding() const A_WARN_UNUSED
+ int getTitlePadding() const noexcept2 A_WARN_UNUSED
{ return mTitlePadding; }
/**
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 26ef6d0bb..b44c5aae9 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -181,7 +181,7 @@ class ChatWindow final : public Window,
*/
void setRecordingFile(const std::string &msg);
- bool getReturnTogglesChat() const A_WARN_UNUSED
+ bool getReturnTogglesChat() const noexcept2 A_WARN_UNUSED
{ return mReturnToggles; }
void setReturnTogglesChat(const bool toggles)
diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h
index 502e5c526..0a98da353 100644
--- a/src/gui/windows/shopwindow.h
+++ b/src/gui/windows/shopwindow.h
@@ -120,7 +120,7 @@ class ShopWindow final : public Window,
void setAcceptPlayer(const std::string &name)
{ mAcceptPlayer = name; }
- const std::string &getAcceptPlayer() const A_WARN_UNUSED
+ const std::string &getAcceptPlayer() const noexcept2 A_WARN_UNUSED
{ return mAcceptPlayer; }
void announce(ShopItems *const list, const int mode);
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 5a4a89afe..cf0bf2f62 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -112,7 +112,7 @@ class SkillDialog final : public Window,
const int id,
const int duration);
- bool hasSkills() const A_WARN_UNUSED
+ bool hasSkills() const noexcept2 A_WARN_UNUSED
{ return !mSkills.empty(); }
void widgetResized(const Event &event) override final;
diff --git a/src/gui/windows/socialwindow.h b/src/gui/windows/socialwindow.h
index 6c23fd292..24cc32c5d 100644
--- a/src/gui/windows/socialwindow.h
+++ b/src/gui/windows/socialwindow.h
@@ -97,16 +97,16 @@ class SocialWindow final : public Window,
void prevTab();
- const Map* getMap() const A_WARN_UNUSED
+ const Map* getMap() const noexcept2 A_WARN_UNUSED
{ return mMap; }
void setMap(Map *const map)
{ mMap = map; mProcessedPortals = false; }
- bool getProcessedPortals() const A_WARN_UNUSED
+ bool getProcessedPortals() const noexcept2 A_WARN_UNUSED
{ return mProcessedPortals; }
- void setProcessedPortals(const bool n)
+ void setProcessedPortals(const bool n) noexcept2
{ mProcessedPortals = n; }
void selectPortal(const unsigned num);
diff --git a/src/gui/windows/textdialog.h b/src/gui/windows/textdialog.h
index edf97c547..fef9e59df 100644
--- a/src/gui/windows/textdialog.h
+++ b/src/gui/windows/textdialog.h
@@ -68,7 +68,7 @@ class TextDialog final : public Window,
void setText(const std::string &text);
- static bool isActive() A_WARN_UNUSED
+ static bool isActive() noexcept2 A_WARN_UNUSED
{ return instances; }
void close() override final;
diff --git a/src/gui/windows/textselectdialog.h b/src/gui/windows/textselectdialog.h
index 70da4ad5e..45d5fcc43 100644
--- a/src/gui/windows/textselectdialog.h
+++ b/src/gui/windows/textselectdialog.h
@@ -75,13 +75,13 @@ class TextSelectDialog notfinal : public Window,
void addText(const std::string &text);
- std::string getText() const A_WARN_UNUSED
+ std::string getText() const noexcept2 A_WARN_UNUSED
{ return mText; }
- void setTag(const int tag)
+ void setTag(const int tag) noexcept2
{ mTag = tag; }
- int getTag() const A_WARN_UNUSED
+ int getTag() const noexcept2 A_WARN_UNUSED
{ return mTag; }
protected:
diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h
index 4920fe90c..be1038d62 100644
--- a/src/gui/windows/tradewindow.h
+++ b/src/gui/windows/tradewindow.h
@@ -160,7 +160,7 @@ class TradeWindow final : public Window,
void initTrade(const std::string &nick);
- std::string getAutoTradeNick() const A_WARN_UNUSED
+ std::string getAutoTradeNick() const noexcept2 A_WARN_UNUSED
{ return mAutoAddToNick; }
bool checkItem(const Item *const item) const A_WARN_UNUSED;
diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h
index b125bc655..b5aee4cf8 100644
--- a/src/gui/windows/whoisonline.h
+++ b/src/gui/windows/whoisonline.h
@@ -78,13 +78,13 @@ class WhoIsOnline final : public Window,
void widgetResized(const Event &event) override final;
- const std::set<OnlinePlayer*> &getOnlinePlayers() const A_WARN_UNUSED
+ const std::set<OnlinePlayer*> &getOnlinePlayers() const noexcept2 A_WARN_UNUSED
{ return mOnlinePlayers; }
- const std::set<std::string> &getOnlineNicks() const A_WARN_UNUSED
+ const std::set<std::string> &getOnlineNicks() const noexcept2 A_WARN_UNUSED
{ return mOnlineNicks; }
- void setAllowUpdate(const bool n)
+ void setAllowUpdate(const bool n) noexcept2
{ mAllowUpdate = n; }
void optionChanged(const std::string &name) override final;
diff --git a/src/guild.h b/src/guild.h
index 7e5b63a40..31c0a66cc 100644
--- a/src/guild.h
+++ b/src/guild.h
@@ -39,10 +39,10 @@ class GuildMember final : public Avatar
public:
A_DELETE_COPY(GuildMember)
- const Guild *getGuild() const A_WARN_UNUSED
+ const Guild *getGuild() const noexcept2 A_WARN_UNUSED
{ return mGuild; }
- int getPos() const A_WARN_UNUSED
+ int getPos() const noexcept2 A_WARN_UNUSED
{ return mPos; }
void setPos(const int pos)
@@ -116,14 +116,14 @@ class Guild final : public AvatarListModel
* Get the name of the guild.
* @return returns name of the guild
*/
- const std::string &getName() const A_WARN_UNUSED
+ const std::string &getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
/**
* Get the id of the guild.
* @return Returns the id of the guild
*/
- int16_t getId() const A_WARN_UNUSED
+ int16_t getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
/**
@@ -159,7 +159,7 @@ class Guild final : public AvatarListModel
* Get whether user can invite users to this guild.
* @return Returns true if user can invite users
*/
- bool getInviteRights() const A_WARN_UNUSED
+ bool getInviteRights() const noexcept2 A_WARN_UNUSED
{ return mCanInviteUsers; }
void setRights(const int16_t rights);
@@ -180,13 +180,13 @@ class Guild final : public AvatarListModel
static Guild *getGuild(const int16_t id) A_WARN_UNUSED;
- const PositionsMap &getPositions() const A_WARN_UNUSED
+ const PositionsMap &getPositions() const noexcept2 A_WARN_UNUSED
{ return mPositions; }
void setEmblemId(const int id)
{ mEmblemId = id; }
- int getEmblemId() const A_WARN_UNUSED
+ int getEmblemId() const noexcept2 A_WARN_UNUSED
{ return mEmblemId; }
static void clearGuilds();
@@ -194,7 +194,7 @@ class Guild final : public AvatarListModel
void setServerGuild(const bool b)
{ mServerGuild = b; }
- bool getServerGuild() const A_WARN_UNUSED
+ bool getServerGuild() const noexcept2 A_WARN_UNUSED
{ return mServerGuild; }
typedef std::vector<GuildMember*> MemberList;
diff --git a/src/input/joystick.h b/src/input/joystick.h
index e302de53e..5942dbbdc 100644
--- a/src/input/joystick.h
+++ b/src/input/joystick.h
@@ -93,24 +93,24 @@ class Joystick final
void finishCalibration();
- bool isCalibrating() const A_WARN_UNUSED
+ bool isCalibrating() const noexcept2 A_WARN_UNUSED
{ return mCalibrating; }
bool buttonPressed(const unsigned char no) const A_WARN_UNUSED;
- bool isUp() const A_WARN_UNUSED
+ bool isUp() const noexcept2 A_WARN_UNUSED
{ return mEnabled && (mDirection & UP); }
- bool isDown() const A_WARN_UNUSED
+ bool isDown() const noexcept2 A_WARN_UNUSED
{ return mEnabled && (mDirection & DOWN); }
- bool isLeft() const A_WARN_UNUSED
+ bool isLeft() const noexcept2 A_WARN_UNUSED
{ return mEnabled && (mDirection & LEFT); }
- bool isRight() const A_WARN_UNUSED
+ bool isRight() const noexcept2 A_WARN_UNUSED
{ return mEnabled && (mDirection & RIGHT); }
- int getNumber() const A_WARN_UNUSED
+ int getNumber() const noexcept2 A_WARN_UNUSED
{ return mNumber; }
void setUseInactive(const bool b)
diff --git a/src/input/keyboardconfig.h b/src/input/keyboardconfig.h
index 3b9610141..ad5e89ad8 100644
--- a/src/input/keyboardconfig.h
+++ b/src/input/keyboardconfig.h
@@ -57,7 +57,7 @@ class KeyboardConfig final
/**
* Get the enable flag, which will stop the user from doing actions.
*/
- bool isEnabled() const A_WARN_UNUSED
+ bool isEnabled() const noexcept2 A_WARN_UNUSED
{ return mEnabled; }
/**
diff --git a/src/input/keyinput.h b/src/input/keyinput.h
index cd5235575..3affc6312 100644
--- a/src/input/keyinput.h
+++ b/src/input/keyinput.h
@@ -98,7 +98,7 @@ class KeyInput final
{
}
- KeyInput &operator=(const KeyInput &k)
+ KeyInput &operator=(const KeyInput &k) noexcept2
{
mKey = k.mKey;
mType = k.mType;
@@ -112,43 +112,43 @@ class KeyInput final
~KeyInput()
{ }
- void setType(KeyEventTypeT type)
+ void setType(KeyEventTypeT type) noexcept2
{
mType = type;
}
- KeyEventTypeT getType() const
+ KeyEventTypeT getType() const noexcept2 A_WARN_UNUSED
{
return mType;
}
- void setKey(const Key& key)
+ void setKey(const Key& key) noexcept2
{
mKey = key;
}
- const Key& getKey() const
+ const Key& getKey() const noexcept2
{
return mKey;
}
- void setActionId(const InputActionT n)
+ void setActionId(const InputActionT n) noexcept2
{
mActionId = n;
}
- InputActionT getActionId() const A_WARN_UNUSED
+ InputActionT getActionId() const noexcept2 A_WARN_UNUSED
{
return mActionId;
}
#ifdef USE_SDL2
- void setText(const std::string &text)
+ void setText(const std::string &text) noexcept2
{
mText = text;
}
- std::string getText() const
+ std::string getText() const noexcept2
{
return mText;
}
diff --git a/src/input/mouseinput.h b/src/input/mouseinput.h
index a8a948cf3..e5121d93c 100644
--- a/src/input/mouseinput.h
+++ b/src/input/mouseinput.h
@@ -108,77 +108,77 @@ class MouseInput final
~MouseInput()
{ }
- void setType(MouseEventTypeT type)
+ void setType(MouseEventTypeT type) noexcept2
{
mType = type;
}
- MouseEventTypeT getType() const
+ MouseEventTypeT getType() const noexcept2
{
return mType;
}
- void setButton(MouseButtonT button)
+ void setButton(MouseButtonT button) noexcept2
{
mButton = button;
}
- MouseButtonT getButton() const
+ MouseButtonT getButton() const noexcept2
{
return mButton;
}
- int getTimeStamp() const
+ int getTimeStamp() const noexcept2
{
return mTimeStamp;
}
- void setTimeStamp(int timeStamp)
+ void setTimeStamp(int timeStamp) noexcept2
{
mTimeStamp = timeStamp;
}
- void setX(int x)
+ void setX(int x) noexcept2
{
mX = x;
}
- int getX() const
+ int getX() const noexcept2
{
return mX;
}
- void setY(int y)
+ void setY(int y) noexcept2
{
mY = y;
}
- int getY() const
+ int getY() const noexcept2
{
return mY;
}
- void setReal(const int x, const int y)
+ void setReal(const int x, const int y) noexcept2
{ mRealX = x; mRealY = y; }
- int getRealX() const A_WARN_UNUSED
+ int getRealX() const noexcept2 A_WARN_UNUSED
{ return mRealX; }
- int getRealY() const A_WARN_UNUSED
+ int getRealY() const noexcept2 A_WARN_UNUSED
{ return mRealY; }
#ifdef ANDROID
- int getTouchX() const A_WARN_UNUSED
+ int getTouchX() const noexcept2 A_WARN_UNUSED
{ return mRealX; }
- int getTouchY() const A_WARN_UNUSED
+ int getTouchY() const noexcept2 A_WARN_UNUSED
{ return mRealY; }
#else // ANDROID
- int getTouchX() const A_WARN_UNUSED
+ int getTouchX() const noexcept2 A_WARN_UNUSED
{ return mX; }
- int getTouchY() const A_WARN_UNUSED
+ int getTouchY() const noexcept2 A_WARN_UNUSED
{ return mY; }
#endif // ANDROID
diff --git a/src/net/messagein.h b/src/net/messagein.h
index 29b6ef7fb..fb46e9059 100644
--- a/src/net/messagein.h
+++ b/src/net/messagein.h
@@ -47,19 +47,19 @@ class MessageIn notfinal
/**
* Returns the message ID.
*/
- int getId() const A_WARN_UNUSED
+ int getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
/**
* Returns the message length.
*/
- unsigned int getLength() const A_WARN_UNUSED
+ unsigned int getLength() const noexcept2 A_WARN_UNUSED
{ return mLength; }
/**
* Returns the length of unread data.
*/
- unsigned int getUnreadLength() const A_WARN_UNUSED
+ unsigned int getUnreadLength() const noexcept2 A_WARN_UNUSED
{ return mLength > mPos ? mLength - mPos : 0; }
/**< Reads a byte. */
@@ -124,7 +124,7 @@ class MessageIn notfinal
static uint8_t fromServerDirection(const uint8_t serverDir)
A_WARN_UNUSED;
- unsigned int getVersion() const A_WARN_UNUSED
+ unsigned int getVersion() const noexcept2 A_WARN_UNUSED
{ return mVersion; }
protected:
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index 033bf4ad6..5ae327d47 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -122,7 +122,7 @@ class ServerInfo final
return *this;
}
- bool isValid() const A_WARN_UNUSED
+ bool isValid() const noexcept2 A_WARN_UNUSED
{
return !(hostname.empty()
|| port == 0
diff --git a/src/party.h b/src/party.h
index 51cfc2f3b..9f2462ac8 100644
--- a/src/party.h
+++ b/src/party.h
@@ -37,10 +37,10 @@ class PartyMember final : public Avatar
public:
A_DELETE_COPY(PartyMember)
- const Party *getParty() const A_WARN_UNUSED
+ const Party *getParty() const noexcept2 A_WARN_UNUSED
{ return mParty; }
- bool getLeader() const A_WARN_UNUSED
+ bool getLeader() const noexcept2 A_WARN_UNUSED
{ return mLeader; }
void setLeader(const bool leader)
@@ -92,14 +92,14 @@ class Party final : public AvatarListModel
* Get the name of the party.
* @return returns name of the party
*/
- const std::string &getName() const A_WARN_UNUSED
+ const std::string &getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
/**
* Get the id of the party.
* @return Returns the id of the party
*/
- int16_t getId() const A_WARN_UNUSED
+ int16_t getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
/**
@@ -135,7 +135,7 @@ class Party final : public AvatarListModel
* Get whether user can invite users to this party.
* @return Returns true if user can invite users
*/
- bool getInviteRights() const A_WARN_UNUSED
+ bool getInviteRights() const noexcept2 A_WARN_UNUSED
{ return mCanInviteUsers; }
void setRights(const int16_t rights);
diff --git a/src/render/graphics.h b/src/render/graphics.h
index b2e38367d..a7d1a23d1 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -128,7 +128,7 @@ class Graphics notfinal
};
void setWindow(SDL_Window *restrict const window,
- const int width, const int height) restrict2
+ const int width, const int height) restrict2 noexcept2
{
mWindow = window;
mRect.w = static_cast<RectSize>(width);
diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h
index 3c5a9ab98..d9ef9522c 100644
--- a/src/resources/beinginfo.h
+++ b/src/resources/beinginfo.h
@@ -67,12 +67,12 @@ class BeingInfo final
void setName(const std::string &name)
{ mName = name; }
- const std::string &getName() const A_WARN_UNUSED
+ const std::string &getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
void setDisplay(const SpriteDisplay &display);
- const SpriteDisplay &getDisplay() const A_WARN_UNUSED
+ const SpriteDisplay &getDisplay() const noexcept2 A_WARN_UNUSED
{ return mDisplay; }
void setTargetCursorSize(const std::string &size);
@@ -86,10 +86,10 @@ class BeingInfo final
void setHoverCursor(const CursorT &cursor)
{ mHoverCursor = cursor; }
- CursorT getHoverCursor() const A_WARN_UNUSED
+ CursorT getHoverCursor() const noexcept2 A_WARN_UNUSED
{ return mHoverCursor; }
- TargetCursorSizeT getTargetCursorSize() const A_WARN_UNUSED
+ TargetCursorSizeT getTargetCursorSize() const noexcept2 A_WARN_UNUSED
{ return mTargetCursorSize; }
void addSound(const ItemSoundEvent::Type event,
@@ -118,58 +118,58 @@ class BeingInfo final
/**
* Gets the way the being is blocked by other objects
*/
- unsigned char getBlockWalkMask() const A_WARN_UNUSED
+ unsigned char getBlockWalkMask() const noexcept2 A_WARN_UNUSED
{ return mBlockWalkMask; }
void setBlockType(const BlockTypeT &blockType)
{ mBlockType = blockType; }
- BlockTypeT getBlockType() const A_WARN_UNUSED
+ BlockTypeT getBlockType() const noexcept2 A_WARN_UNUSED
{ return mBlockType; }
void setTargetOffsetX(const int n)
{ mTargetOffsetX = n; }
- int getTargetOffsetX() const A_WARN_UNUSED
+ int getTargetOffsetX() const noexcept2 A_WARN_UNUSED
{ return mTargetOffsetX; }
void setTargetOffsetY(const int n)
{ mTargetOffsetY = n; }
- int getTargetOffsetY() const A_WARN_UNUSED
+ int getTargetOffsetY() const noexcept2 A_WARN_UNUSED
{ return mTargetOffsetY; }
void setNameOffsetX(const int n)
{ mNameOffsetX = n; }
- int getNameOffsetX() const A_WARN_UNUSED
+ int getNameOffsetX() const noexcept2 A_WARN_UNUSED
{ return mNameOffsetX; }
void setNameOffsetY(const int n)
{ mNameOffsetY = n; }
- int getNameOffsetY() const A_WARN_UNUSED
+ int getNameOffsetY() const noexcept2 A_WARN_UNUSED
{ return mNameOffsetY; }
void setHpBarOffsetX(const int n)
{ mHpBarOffsetX = n; }
- int getHpBarOffsetX() const A_WARN_UNUSED
+ int getHpBarOffsetX() const noexcept2 A_WARN_UNUSED
{ return mHpBarOffsetX; }
void setHpBarOffsetY(const int n)
{ mHpBarOffsetY = n; }
- int getHpBarOffsetY() const A_WARN_UNUSED
+ int getHpBarOffsetY() const noexcept2 A_WARN_UNUSED
{ return mHpBarOffsetY; }
void setMaxHP(const int n)
{ mMaxHP = n; }
- int getMaxHP() const A_WARN_UNUSED
+ int getMaxHP() const noexcept2 A_WARN_UNUSED
{ return mMaxHP; }
- bool isStaticMaxHP() const A_WARN_UNUSED
+ bool isStaticMaxHP() const noexcept2 A_WARN_UNUSED
{ return mStaticMaxHP; }
void setStaticMaxHP(const bool n)
@@ -178,31 +178,31 @@ class BeingInfo final
void setTargetSelection(const bool n)
{ mTargetSelection = n; }
- bool isTargetSelection() const A_WARN_UNUSED
+ bool isTargetSelection() const noexcept2 A_WARN_UNUSED
{ return mTargetSelection; }
- int getSortOffsetY() const A_WARN_UNUSED
+ int getSortOffsetY() const noexcept2 A_WARN_UNUSED
{ return mSortOffsetY; }
void setSortOffsetY(const int n)
{ mSortOffsetY = n; }
- int getDeadSortOffsetY() const A_WARN_UNUSED
+ int getDeadSortOffsetY() const noexcept2 A_WARN_UNUSED
{ return mDeadSortOffsetY; }
void setDeadSortOffsetY(const int n)
{ mDeadSortOffsetY = n; }
- BeingTypeId getAvatarId() const A_WARN_UNUSED
+ BeingTypeId getAvatarId() const noexcept2 A_WARN_UNUSED
{ return mAvatarId; }
void setAvatarId(const BeingTypeId id)
{ mAvatarId = id; }
- int getWidth() const A_WARN_UNUSED
+ int getWidth() const noexcept2 A_WARN_UNUSED
{ return mWidth; }
- int getHeight() const A_WARN_UNUSED
+ int getHeight() const noexcept2 A_WARN_UNUSED
{ return mHeight; }
void setWidth(const int n)
@@ -214,115 +214,115 @@ class BeingInfo final
void setStartFollowDist(const int n)
{ mStartFollowDist = n; }
- int getStartFollowDist() const A_WARN_UNUSED
+ int getStartFollowDist() const noexcept2 A_WARN_UNUSED
{ return mStartFollowDist; }
void setFollowDist(const int n)
{ mFollowDist = n; }
- int getFollowDist() const A_WARN_UNUSED
+ int getFollowDist() const noexcept2 A_WARN_UNUSED
{ return mFollowDist; }
void setWalkSpeed(const int n)
{ mWalkSpeed = n; }
- int getWalkSpeed() const A_WARN_UNUSED
+ int getWalkSpeed() const noexcept2 A_WARN_UNUSED
{ return mWalkSpeed; }
void setWarpDist(const int n)
{ mWarpDist = n; }
- int getWarpDist() const A_WARN_UNUSED
+ int getWarpDist() const noexcept2 A_WARN_UNUSED
{ return mWarpDist; }
void setSitOffsetX(const int n)
{ mSitOffsetX = n; }
- int getSitOffsetX() const A_WARN_UNUSED
+ int getSitOffsetX() const noexcept2 A_WARN_UNUSED
{ return mSitOffsetX; }
void setSitOffsetY(const int n)
{ mSitOffsetY = n; }
- int getSitOffsetY() const A_WARN_UNUSED
+ int getSitOffsetY() const noexcept2 A_WARN_UNUSED
{ return mSitOffsetY; }
void setMoveOffsetX(const int n)
{ mMoveOffsetX = n; }
- int getMoveOffsetX() const A_WARN_UNUSED
+ int getMoveOffsetX() const noexcept2 A_WARN_UNUSED
{ return mMoveOffsetX; }
void setMoveOffsetY(const int n)
{ mMoveOffsetY = n; }
- int getMoveOffsetY() const A_WARN_UNUSED
+ int getMoveOffsetY() const noexcept2 A_WARN_UNUSED
{ return mMoveOffsetY; }
void setDeadOffsetX(const int n)
{ mDeadOffsetX = n; }
- int getDeadOffsetX() const A_WARN_UNUSED
+ int getDeadOffsetX() const noexcept2 A_WARN_UNUSED
{ return mDeadOffsetX; }
void setDeadOffsetY(const int n)
{ mDeadOffsetY = n; }
- int getDeadOffsetY() const A_WARN_UNUSED
+ int getDeadOffsetY() const noexcept2 A_WARN_UNUSED
{ return mDeadOffsetY; }
void setAttackOffsetX(const int n)
{ mAttackOffsetX = n; }
- int getAttackOffsetX() const A_WARN_UNUSED
+ int getAttackOffsetX() const noexcept2 A_WARN_UNUSED
{ return mAttackOffsetX; }
void setAttackOffsetY(const int n)
{ mAttackOffsetY = n; }
- int getAttackOffsetY() const A_WARN_UNUSED
+ int getAttackOffsetY() const noexcept2 A_WARN_UNUSED
{ return mAttackOffsetY; }
void setThinkTime(const int n)
{ mThinkTime = n; }
- int getThinkTime() const A_WARN_UNUSED
+ int getThinkTime() const noexcept2 A_WARN_UNUSED
{ return mThinkTime; }
void setDirectionType(const int n)
{ mDirectionType = n; }
- int getDirectionType() const A_WARN_UNUSED
+ int getDirectionType() const noexcept2 A_WARN_UNUSED
{ return mDirectionType; }
void setSitDirectionType(const int n)
{ mSitDirectionType = n; }
- int getSitDirectionType() const A_WARN_UNUSED
+ int getSitDirectionType() const noexcept2 A_WARN_UNUSED
{ return mSitDirectionType; }
void setDeadDirectionType(const int n)
{ mDeadDirectionType = n; }
- int getDeadDirectionType() const A_WARN_UNUSED
+ int getDeadDirectionType() const noexcept2 A_WARN_UNUSED
{ return mDeadDirectionType; }
void setAttackDirectionType(const int n)
{ mAttackDirectionType = n; }
- int getAttackDirectionType() const A_WARN_UNUSED
+ int getAttackDirectionType() const noexcept2 A_WARN_UNUSED
{ return mAttackDirectionType; }
void setAllowDelete(const bool b)
{ mAllowDelete = b; }
- int getAllowDelete() const A_WARN_UNUSED
+ int getAllowDelete() const noexcept2 A_WARN_UNUSED
{ return mAllowDelete; }
void setQuickActionEffectId(const int n)
{ mQuickActionEffectId = n; }
- int getQuickActionEffectId() const A_WARN_UNUSED
+ int getQuickActionEffectId() const noexcept2 A_WARN_UNUSED
{ return mQuickActionEffectId; }
void setColorsList(const std::string &name);
diff --git a/src/resources/image/image.h b/src/resources/image/image.h
index bb78f685c..ca5a8a12e 100644
--- a/src/resources/image/image.h
+++ b/src/resources/image/image.h
@@ -96,19 +96,19 @@ class Image notfinal : public Resource
/**
* Tells is the image is loaded
*/
- bool isLoaded() const A_WARN_UNUSED
+ bool isLoaded() const noexcept2 A_WARN_UNUSED
{ return mLoaded; }
/**
* Returns the width of the image.
*/
- inline int getWidth() const A_WARN_UNUSED A_INLINE
+ inline int getWidth() const noexcept2 A_WARN_UNUSED A_INLINE
{ return mBounds.w; }
/**
* Returns the height of the image.
*/
- inline int getHeight() const A_WARN_UNUSED A_INLINE
+ inline int getHeight() const noexcept2 A_WARN_UNUSED A_INLINE
{ return mBounds.h; }
/**
@@ -149,7 +149,7 @@ class Image notfinal : public Resource
/**
* Get the alpha Channel of a SDL surface.
*/
- uint8_t *SDLgetAlphaChannel() const A_WARN_UNUSED
+ uint8_t *SDLgetAlphaChannel() const noexcept2 A_WARN_UNUSED
{ return mAlphaChannel; }
void SDLCleanCache();
@@ -157,13 +157,13 @@ class Image notfinal : public Resource
void SDLTerminateAlphaCache();
#ifdef USE_OPENGL
- int getTextureWidth() const A_WARN_UNUSED
+ int getTextureWidth() const noexcept2 A_WARN_UNUSED
{ return mTexWidth; }
- int getTextureHeight() const A_WARN_UNUSED
+ int getTextureHeight() const noexcept2 A_WARN_UNUSED
{ return mTexHeight; }
- GLuint getGLImage() const A_WARN_UNUSED
+ GLuint getGLImage() const noexcept2 A_WARN_UNUSED
{ return mGLImage; }
void decRef() override;
@@ -173,27 +173,27 @@ class Image notfinal : public Resource
int mTexHeight;
#endif // USE_OPENGL
- bool isHasAlphaChannel() const A_WARN_UNUSED
+ bool isHasAlphaChannel() const noexcept2 A_WARN_UNUSED
{ return mHasAlphaChannel; }
- bool isAlphaVisible() const A_WARN_UNUSED
+ bool isAlphaVisible() const noexcept2 A_WARN_UNUSED
{ return mIsAlphaVisible; }
void setAlphaVisible(const bool b)
{ mIsAlphaVisible = b; }
- bool isAlphaCalculated() const A_WARN_UNUSED
+ bool isAlphaCalculated() const noexcept2 A_WARN_UNUSED
{ return mIsAlphaCalculated; }
- void setAlphaCalculated(const bool b)
+ void setAlphaCalculated(const bool b) noexcept2
{ mIsAlphaCalculated = b; }
- SDL_Surface* getSDLSurface()
+ SDL_Surface* getSDLSurface() noexcept2 A_WARN_UNUSED
{ return mSDLSurface; }
int calcMemoryLocal() const override;
- virtual ImageTypeT getType() const
+ virtual ImageTypeT getType() const noexcept2 A_WARN_UNUSED
{ return ImageType::Image; }
SDL_Rect mBounds;
diff --git a/src/resources/image/subimage.h b/src/resources/image/subimage.h
index 14decc14d..756298152 100644
--- a/src/resources/image/subimage.h
+++ b/src/resources/image/subimage.h
@@ -66,7 +66,7 @@ class SubImage final : public Image
const int width,
const int height) override final A_WARN_UNUSED;
- ImageTypeT getType() const override final
+ ImageTypeT getType() const noexcept2 override final
{ return ImageType::SubImage; }
int calcMemoryLocal() const override;
diff --git a/src/resources/imageset.h b/src/resources/imageset.h
index 6673303aa..3378cd365 100644
--- a/src/resources/imageset.h
+++ b/src/resources/imageset.h
@@ -53,35 +53,35 @@ class ImageSet notfinal : public Resource
/**
* Returns the width of the images in the image set.
*/
- int getWidth() const A_WARN_UNUSED
+ int getWidth() const noexcept2 A_WARN_UNUSED
{ return mWidth; }
/**
* Returns the height of the images in the image set.
*/
- int getHeight() const A_WARN_UNUSED
+ int getHeight() const noexcept2 A_WARN_UNUSED
{ return mHeight; }
typedef std::vector<Image*>::size_type size_type;
Image* get(const size_type i) const A_WARN_UNUSED;
- size_type size() const A_WARN_UNUSED
+ size_type size() const noexcept2 A_WARN_UNUSED
{ return mImages.size(); }
- int getOffsetX() const A_WARN_UNUSED
+ int getOffsetX() const noexcept2 A_WARN_UNUSED
{ return mOffsetX; }
- void setOffsetX(const int n)
+ void setOffsetX(const int n) noexcept2
{ mOffsetX = n; }
- int getOffsetY() const A_WARN_UNUSED
+ int getOffsetY() const noexcept2 A_WARN_UNUSED
{ return mOffsetY; }
- void setOffsetY(const int n)
+ void setOffsetY(const int n) noexcept2
{ mOffsetY = n; }
- const std::vector<Image*> &getImages() const
+ const std::vector<Image*> &getImages() const noexcept2 A_WARN_UNUSED
{ return mImages; }
int calcMemoryLocal() const override;
diff --git a/src/resources/inventory/inventory.h b/src/resources/inventory/inventory.h
index 8d1e0c076..473284c09 100644
--- a/src/resources/inventory/inventory.h
+++ b/src/resources/inventory/inventory.h
@@ -70,7 +70,7 @@ class Inventory notfinal
/**
* Returns the size that this instance is configured for.
*/
- unsigned getSize() const A_WARN_UNUSED
+ unsigned getSize() const noexcept2 A_WARN_UNUSED
{ return mSize; }
/**
@@ -152,7 +152,7 @@ class Inventory notfinal
/**
* Get the number of slots filled with an item
*/
- int getNumberOfSlotsUsed() const A_WARN_UNUSED
+ int getNumberOfSlotsUsed() const noexcept2 A_WARN_UNUSED
{ return mUsed; }
/**
@@ -164,10 +164,10 @@ class Inventory notfinal
void removeInventoyListener(InventoryListener *const listener);
- InventoryTypeT getType() const A_WARN_UNUSED
+ InventoryTypeT getType() const noexcept2 A_WARN_UNUSED
{ return mType; }
- bool isMainInventory() const A_WARN_UNUSED
+ bool isMainInventory() const noexcept2 A_WARN_UNUSED
{ return mType == InventoryType::Inventory; }
const Item *findItemBySprite(std::string spritePath,
diff --git a/src/resources/item/cardslist.h b/src/resources/item/cardslist.h
index e37b3a02d..884766be8 100644
--- a/src/resources/item/cardslist.h
+++ b/src/resources/item/cardslist.h
@@ -54,7 +54,7 @@ struct CardsList final
}
}
- bool isEmpty() const A_WARN_UNUSED
+ bool isEmpty() const noexcept2 A_WARN_UNUSED
{
return cards[0] == 0 &&
cards[1] == 0 &&
diff --git a/src/resources/item/complexitem.h b/src/resources/item/complexitem.h
index aae9130fc..0fe16a999 100644
--- a/src/resources/item/complexitem.h
+++ b/src/resources/item/complexitem.h
@@ -55,7 +55,7 @@ class ComplexItem final : public Item
void addChild(const Item *const item,
const int amount);
- const std::vector<Item*> &getChilds() const A_WARN_UNUSED
+ const std::vector<Item*> &getChilds() const noexcept2 A_WARN_UNUSED
{ return mChildItems; }
protected:
diff --git a/src/resources/item/item.h b/src/resources/item/item.h
index 0a3eeea9e..8aa802c6c 100644
--- a/src/resources/item/item.h
+++ b/src/resources/item/item.h
@@ -75,91 +75,91 @@ class Item notfinal
/**
* Returns the item id.
*/
- int getId() const A_WARN_UNUSED
+ int getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
/**
* Returns the item image.
*/
- Image *getImage() const A_WARN_UNUSED
+ Image *getImage() const noexcept2 A_WARN_UNUSED
{ return mImage; }
/**
* Sets the number of items.
*/
- void setQuantity(const int quantity)
+ void setQuantity(const int quantity) noexcept2
{ mQuantity = quantity; }
/**
* Increases the number of items by the given amount.
*/
- void increaseQuantity(const int amount)
+ void increaseQuantity(const int amount) noexcept2
{ mQuantity += amount; }
/**
* Returns the number of items.
*/
- int getQuantity() const A_WARN_UNUSED
+ int getQuantity() const noexcept2 A_WARN_UNUSED
{ return mQuantity; }
/**
* Sets whether this item is considered equipment.
*/
- void setEquipment(const Equipm equipment)
+ void setEquipment(const Equipm equipment) noexcept2
{ mEquipment = equipment; }
/**
* Returns whether this item is considered equipment.
*/
- Equipm isEquipment() const A_WARN_UNUSED
+ Equipm isEquipment() const noexcept2 A_WARN_UNUSED
{ return mEquipment; }
/**
* Sets whether this item is equipped.
*/
- void setEquipped(const Equipped equipped)
+ void setEquipped(const Equipped equipped) noexcept2
{ mEquipped = equipped; }
/**
* Returns whether this item is equipped.
*/
- Equipped isEquipped() const A_WARN_UNUSED
+ Equipped isEquipped() const noexcept2 A_WARN_UNUSED
{ return mEquipped; }
/**
* Sets this item refine level.
*/
- void setRefine(const uint8_t refine)
+ void setRefine(const uint8_t refine) noexcept2
{ mRefine = refine; }
/**
* Returns this item refine level.
*/
- uint8_t getRefine() const A_WARN_UNUSED
+ uint8_t getRefine() const noexcept2 A_WARN_UNUSED
{ return mRefine; }
/**
* Sets whether this item is in equipment.
*/
- void setInEquipment(const bool inEquipment)
+ void setInEquipment(const bool inEquipment) noexcept2
{ mInEquipment = inEquipment; }
/**
* Returns whether this item is in equipment.
*/
- bool isInEquipment() const A_WARN_UNUSED
+ bool isInEquipment() const noexcept2 A_WARN_UNUSED
{ return mInEquipment; }
/**
* Sets the inventory index of this item.
*/
- void setInvIndex(const int index)
+ void setInvIndex(const int index) noexcept2
{ mInvIndex = index; }
/**
* Returns the inventory index of this item.
*/
- int getInvIndex() const A_WARN_UNUSED
+ int getInvIndex() const noexcept2 A_WARN_UNUSED
{ return mInvIndex; }
/**
@@ -175,31 +175,31 @@ class Item notfinal
bool isHaveTag(const int tagId) const A_WARN_UNUSED;
- ItemColor getColor() const A_WARN_UNUSED
+ ItemColor getColor() const noexcept2 A_WARN_UNUSED
{ return mColor; }
- void setColor(const ItemColor color)
+ void setColor(const ItemColor color) noexcept2
{ mColor = color; }
- const std::string &getDescription() const A_WARN_UNUSED
+ const std::string &getDescription() const noexcept2 A_WARN_UNUSED
{ return mDescription; }
- void setIdentified(const Identified b)
+ void setIdentified(const Identified b) noexcept2
{ mIdentified = b; }
- Identified getIdentified() const A_WARN_UNUSED
+ Identified getIdentified() const noexcept2 A_WARN_UNUSED
{ return mIdentified; }
- void setDamaged(const Damaged b)
+ void setDamaged(const Damaged b) noexcept2
{ mDamaged = b; }
- Damaged getDamaged() const A_WARN_UNUSED
+ Damaged getDamaged() const noexcept2 A_WARN_UNUSED
{ return mDamaged; }
- void setFavorite(const Favorite b)
+ void setFavorite(const Favorite b) noexcept2
{ mFavorite = b; }
- Favorite getFavorite() const A_WARN_UNUSED
+ Favorite getFavorite() const noexcept2 A_WARN_UNUSED
{ return mFavorite; }
void setCard(const int index, const int id);
@@ -208,26 +208,26 @@ class Item notfinal
void setCards(const int *const cards, const int size);
- const int *getCards() const
+ const int *getCards() const noexcept2 A_WARN_UNUSED
{ return mCards; }
- void setType(const ItemTypeT type)
+ void setType(const ItemTypeT type) noexcept2
{ mType = type; }
- ItemTypeT getType() const A_WARN_UNUSED
+ ItemTypeT getType() const noexcept2 A_WARN_UNUSED
{ return mType; }
- void setTag(const int tag)
+ void setTag(const int tag) noexcept2
{ mTag = tag; }
- int getTag() const A_WARN_UNUSED
+ int getTag() const noexcept2 A_WARN_UNUSED
{ return mTag; }
void addCard(const int card);
void updateColor();
- static constexpr bool isItem(const int id)
+ static constexpr bool isItem(const int id) noexcept2 A_WARN_UNUSED
{
return id != 0 &&
id != CARD0_FORGE &&
diff --git a/src/resources/item/shopitem.h b/src/resources/item/shopitem.h
index bf966aeb7..7961fce92 100644
--- a/src/resources/item/shopitem.h
+++ b/src/resources/item/shopitem.h
@@ -126,7 +126,7 @@ class ShopItem final : public Item
*
* @return the price of the item
*/
- int getPrice() const A_WARN_UNUSED
+ int getPrice() const noexcept2 A_WARN_UNUSED
{ return mPrice; }
/**
@@ -134,24 +134,24 @@ class ShopItem final : public Item
*
* @return the display name for the item in the shop list
*/
- const std::string &getDisplayName() const A_WARN_UNUSED
+ const std::string &getDisplayName() const noexcept2 A_WARN_UNUSED
{ return mDisplayName; }
- void setVisible(const bool b)
+ void setVisible(const bool b) noexcept2
{ mVisible = b; }
- bool isVisible() const
+ bool isVisible() const noexcept2 A_WARN_UNUSED
{ return mVisible; }
void increaseUsedQuantity(const int amount);
- int getUsedQuantity() const A_WARN_UNUSED
+ int getUsedQuantity() const noexcept2 A_WARN_UNUSED
{ return mUsedQuantity; }
- void setDisabled(const bool b)
+ void setDisabled(const bool b) noexcept2
{ mDisabled = b; }
- bool getDisabled() const A_WARN_UNUSED
+ bool getDisabled() const noexcept2 A_WARN_UNUSED
{ return mDisabled; }
protected:
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h
index a7d877f65..409978ebc 100644
--- a/src/resources/iteminfo.h
+++ b/src/resources/iteminfo.h
@@ -62,25 +62,25 @@ class ItemInfo final
~ItemInfo();
- void setId(const int id)
+ void setId(const int id) noexcept2
{ mId = id; }
- int getId() const A_WARN_UNUSED
+ int getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
- void setName(const std::string &name)
+ void setName(const std::string &name) noexcept2
{ mName = name; }
- const std::string &getName() const A_WARN_UNUSED
+ const std::string &getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
const std::string getName(const ItemColor color)
const A_WARN_UNUSED;
- void setNameEn(const std::string &name)
+ void setNameEn(const std::string &name) noexcept2
{ mNameEn = name; }
- const std::string &getNameEn() const A_WARN_UNUSED
+ const std::string &getNameEn() const noexcept2 A_WARN_UNUSED
{ return mNameEn; }
const std::string getNameEn(const ItemColor color)
@@ -88,55 +88,55 @@ class ItemInfo final
const std::string getLink() const A_WARN_UNUSED;
- void setDisplay(const SpriteDisplay &display)
+ void setDisplay(const SpriteDisplay &display) noexcept2
{ mDisplay = display; }
- const SpriteDisplay &getDisplay() const A_WARN_UNUSED
+ const SpriteDisplay &getDisplay() const noexcept2 A_WARN_UNUSED
{ return mDisplay; }
- void setDescription(const std::string &description)
+ void setDescription(const std::string &description) noexcept2
{ mDescription = description; }
- const std::string &getDescription() const A_WARN_UNUSED
+ const std::string &getDescription() const noexcept2 A_WARN_UNUSED
{ return mDescription; }
const std::string getDescription(const ItemColor color)
const A_WARN_UNUSED;
- void setEffect(const std::string &effect)
+ void setEffect(const std::string &effect) noexcept2
{ mEffect = effect; }
- const std::string &getEffect() const A_WARN_UNUSED
+ const std::string &getEffect() const noexcept2 A_WARN_UNUSED
{ return mEffect; }
- void setType(const ItemDbTypeT type)
+ void setType(const ItemDbTypeT type) noexcept2
{ mType = type; }
- void setUseButton(const std::string &str)
+ void setUseButton(const std::string &str) noexcept2
{ mUseButton = str; }
- const std::string &getUseButton() const A_WARN_UNUSED
+ const std::string &getUseButton() const noexcept2 A_WARN_UNUSED
{ return mUseButton; }
- void setUseButton2(const std::string &str)
+ void setUseButton2(const std::string &str) noexcept2
{ mUseButton2 = str; }
- const std::string &getUseButton2() const A_WARN_UNUSED
+ const std::string &getUseButton2() const noexcept2 A_WARN_UNUSED
{ return mUseButton2; }
- ItemDbTypeT getType() const A_WARN_UNUSED
+ ItemDbTypeT getType() const noexcept2 A_WARN_UNUSED
{ return mType; }
- void setWeight(const int weight)
+ void setWeight(const int weight) noexcept2
{ mWeight = weight; }
- int getWeight() const A_WARN_UNUSED
+ int getWeight() const noexcept2 A_WARN_UNUSED
{ return mWeight; }
- int getView() const
+ int getView() const noexcept2 A_WARN_UNUSED
{ return mView; }
- void setView(const int view)
+ void setView(const int view) noexcept2
{ mView = view; }
void setSprite(const std::string &animationFile,
@@ -156,46 +156,46 @@ class ItemInfo final
// Handlers for seting and getting the string
// used for particles when attacking
- void setMissileParticleFile(const std::string &s)
+ void setMissileParticleFile(const std::string &s) noexcept2
{ mMissileParticleFile = s; }
- const std::string &getMissileParticleFile() const A_WARN_UNUSED
+ const std::string &getMissileParticleFile() const noexcept2 A_WARN_UNUSED
{ return mMissileParticleFile; }
- void setHitEffectId(const int s)
+ void setHitEffectId(const int s) noexcept2
{ mHitEffectId = s; }
- int getHitEffectId() const A_WARN_UNUSED
+ int getHitEffectId() const noexcept2 A_WARN_UNUSED
{ return mHitEffectId; }
- void setCriticalHitEffectId(const int s)
+ void setCriticalHitEffectId(const int s) noexcept2
{ mCriticalHitEffectId = s; }
- int getCriticalHitEffectId() const A_WARN_UNUSED
+ int getCriticalHitEffectId() const noexcept2 A_WARN_UNUSED
{ return mCriticalHitEffectId; }
- void setMissEffectId(const int s)
+ void setMissEffectId(const int s) noexcept2
{ mMissEffectId = s; }
- int getMissEffectId() const A_WARN_UNUSED
+ int getMissEffectId() const noexcept2 A_WARN_UNUSED
{ return mMissEffectId; }
- const std::string &getAttackAction() const
+ const std::string &getAttackAction() const noexcept2 A_WARN_UNUSED
{ return mAttackAction; }
- const std::string &getSkyAttackAction() const
+ const std::string &getSkyAttackAction() const noexcept2 A_WARN_UNUSED
{ return mSkyAttackAction; }
- const std::string &getWaterAttackAction() const
+ const std::string &getWaterAttackAction() const noexcept2 A_WARN_UNUSED
{ return mWaterAttackAction; }
- const std::string &getRideAttackAction() const
+ const std::string &getRideAttackAction() const noexcept2 A_WARN_UNUSED
{ return mRideAttackAction; }
- int getAttackRange() const A_WARN_UNUSED
+ int getAttackRange() const noexcept2 A_WARN_UNUSED
{ return mAttackRange; }
- void setAttackRange(const int r)
+ void setAttackRange(const int r) noexcept2
{ mAttackRange = r; }
void addSound(const ItemSoundEvent::Type event,
@@ -217,36 +217,36 @@ class ItemInfo final
void setDrawPriority(const int direction, const int n);
- const IntMap &getTags() const A_WARN_UNUSED
+ const IntMap &getTags() const noexcept2 A_WARN_UNUSED
{ return mTags; }
void addTag(const int tag)
{ mTags[tag] = 1; }
- void setRemoveSprites()
+ void setRemoveSprites() noexcept2
{ mIsRemoveSprites = true; }
- bool isRemoveSprites() const A_WARN_UNUSED
+ bool isRemoveSprites() const noexcept2 A_WARN_UNUSED
{ return mIsRemoveSprites; }
- void setMaxFloorOffsetX(const int i)
+ void setMaxFloorOffsetX(const int i) noexcept2
{ maxFloorOffsetX = i; }
- void setMaxFloorOffsetY(const int i)
+ void setMaxFloorOffsetY(const int i) noexcept2
{ maxFloorOffsetY = i; }
- int getMaxFloorOffsetX() const A_WARN_UNUSED
+ int getMaxFloorOffsetX() const noexcept2 A_WARN_UNUSED
{ return maxFloorOffsetX; }
- int getMaxFloorOffsetY() const A_WARN_UNUSED
+ int getMaxFloorOffsetY() const noexcept2 A_WARN_UNUSED
{ return maxFloorOffsetY; }
bool isRemoveItemId(int id) const A_WARN_UNUSED;
- void setCardColor(const ItemColor color)
+ void setCardColor(const ItemColor color) noexcept2
{ mCardColor = color; }
- ItemColor getCardColor() const
+ ItemColor getCardColor() const noexcept2
{ return mCardColor; }
/** Effects to be shown when weapon attacks - see also effects.xml */
@@ -270,16 +270,16 @@ class ItemInfo final
void setIconColorsList(const std::string &name);
- bool isHaveColors() const A_WARN_UNUSED
+ bool isHaveColors() const noexcept2 A_WARN_UNUSED
{ return !mColorsListName.empty(); }
- bool isHaveIconColors() const A_WARN_UNUSED
+ bool isHaveIconColors() const noexcept2 A_WARN_UNUSED
{ return !mIconColorsListName.empty(); }
- std::string getColorsListName() const A_WARN_UNUSED
+ std::string getColorsListName() const noexcept2 A_WARN_UNUSED
{ return mColorsListName; }
- std::string getIconColorsListName() const A_WARN_UNUSED
+ std::string getIconColorsListName() const noexcept2 A_WARN_UNUSED
{ return mIconColorsListName; }
const std::string replaceColors(std::string str,
@@ -289,22 +289,22 @@ class ItemInfo final
void setPickupCursor(const std::string &cursor)
{ return setPickupCursor(Cursors::stringToCursor(cursor)); }
- void setPickupCursor(const CursorT &cursor)
+ void setPickupCursor(const CursorT &cursor) noexcept2
{ mPickupCursor = cursor; }
- CursorT getPickupCursor() const A_WARN_UNUSED
+ CursorT getPickupCursor() const noexcept2 A_WARN_UNUSED
{ return mPickupCursor; }
- void setProtected(const bool b)
+ void setProtected(const bool b) noexcept2
{ mProtected = b; }
- bool isProtected() const
+ bool isProtected() const noexcept2 A_WARN_UNUSED
{ return mProtected; }
- int getColorsSize() const
+ int getColorsSize() const noexcept2 A_WARN_UNUSED
{ return mColorsList ? CAST_S32(mColorsList->size()) : 0; }
- int getIconColorsSize() const
+ int getIconColorsSize() const noexcept2 A_WARN_UNUSED
{
return mIconColorsList ? CAST_S32(mIconColorsList->size())
: 0;
diff --git a/src/resources/map/mapitem.h b/src/resources/map/mapitem.h
index 0f9499d24..949eae9ea 100644
--- a/src/resources/map/mapitem.h
+++ b/src/resources/map/mapitem.h
@@ -46,29 +46,29 @@ class MapItem final
~MapItem();
- int getType() const A_WARN_UNUSED
+ int getType() const noexcept2 A_WARN_UNUSED
{ return mType; }
void setType(const int type);
void setPos(const int x, const int y);
- int getX() const A_WARN_UNUSED
+ int getX() const noexcept2 A_WARN_UNUSED
{ return mX; }
- int getY() const A_WARN_UNUSED
+ int getY() const noexcept2 A_WARN_UNUSED
{ return mY; }
- const std::string &getComment() const A_WARN_UNUSED
+ const std::string &getComment() const noexcept2 A_WARN_UNUSED
{ return mComment; }
- void setComment(const std::string &comment)
+ void setComment(const std::string &comment) noexcept2
{ mComment = comment; }
- const std::string &getName() const A_WARN_UNUSED
+ const std::string &getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
- void setName(const std::string &name)
+ void setName(const std::string &name) noexcept2
{ mName = name; }
void draw(Graphics *const graphics,
diff --git a/src/resources/map/tileset.h b/src/resources/map/tileset.h
index 93ff16c2d..a2ded3596 100644
--- a/src/resources/map/tileset.h
+++ b/src/resources/map/tileset.h
@@ -53,13 +53,14 @@ class Tileset final : public ImageSet
/**
* Returns the first gid.
*/
- int getFirstGid() const A_WARN_UNUSED
+ int getFirstGid() const noexcept2 A_WARN_UNUSED
{ return mFirstGid; }
/**
* Set tileset property.
*/
- void setProperties(const std::map<std::string, std::string> &props)
+ void setProperties(const std::map<std::string,
+ std::string> &props) noexcept2
{ mProperties = props; }
/**
diff --git a/src/resources/modinfo.h b/src/resources/modinfo.h
index 1474f3484..8c006e980 100644
--- a/src/resources/modinfo.h
+++ b/src/resources/modinfo.h
@@ -33,28 +33,28 @@ class ModInfo final
A_DELETE_COPY(ModInfo)
- void setName(const std::string &name)
+ void setName(const std::string &name) noexcept2
{ mName = name; }
- const std::string &getName() const A_WARN_UNUSED
+ const std::string &getName() const noexcept2 A_WARN_UNUSED
{ return mName; }
- void setDescription(const std::string &text)
+ void setDescription(const std::string &text) noexcept2
{ mDescription = text; }
- const std::string &getDescription() const A_WARN_UNUSED
+ const std::string &getDescription() const noexcept2 A_WARN_UNUSED
{ return mDescription; }
- void setHelp(const std::string &text)
+ void setHelp(const std::string &text) noexcept2
{ mHelp = text; }
- const std::string &getHelp() const A_WARN_UNUSED
+ const std::string &getHelp() const noexcept2 A_WARN_UNUSED
{ return mHelp; }
void setLocalDir(const std::string &text)
{ mLocalDir = text; }
- const std::string &getLocalDir() const A_WARN_UNUSED
+ const std::string &getLocalDir() const noexcept2 A_WARN_UNUSED
{ return mLocalDir; }
private:
diff --git a/src/resources/resource.h b/src/resources/resource.h
index 009fff4a7..93dc72fb7 100644
--- a/src/resources/resource.h
+++ b/src/resources/resource.h
@@ -73,28 +73,28 @@ class Resource notfinal : public MemoryCounter
/**
* Return the path identifying this resource.
*/
- const std::string &getIdPath() const A_WARN_UNUSED
+ const std::string &getIdPath() const noexcept2 A_WARN_UNUSED
{ return mIdPath; }
/**
* Return refCount for this resource.
*/
- unsigned getRefCount() const A_WARN_UNUSED
+ unsigned getRefCount() const noexcept2 A_WARN_UNUSED
{ return mRefCount; }
- void setSource(const std::string &str)
+ void setSource(const std::string &str) noexcept2
{ mSource = str; }
- std::string getSource() const A_WARN_UNUSED
+ std::string getSource() const noexcept2 A_WARN_UNUSED
{ return mSource; }
- void setProtected(const bool b)
+ void setProtected(const bool b) noexcept2
{ mProtected = b; }
- bool isProtected() const
+ bool isProtected() const noexcept2
{ return mProtected; }
- void setNotCount(const bool b)
+ void setNotCount(const bool b) noexcept2
{ mNotCount = b; }
int calcMemoryLocal() const override;
@@ -103,10 +103,10 @@ class Resource notfinal : public MemoryCounter
{ return mIdPath + "-" + mSource; }
#ifdef DEBUG_DUMP_LEAKS
- bool getDumped() const A_WARN_UNUSED
+ bool getDumped() const noexcept2 A_WARN_UNUSED
{ return mDumped; }
- void setDumped(const bool n)
+ void setDumped(const bool n) noexcept2
{ mDumped = n; }
#endif // DEBUG_DUMP_LEAKS
diff --git a/src/resources/resourcemanager/resourcemanager.h b/src/resources/resourcemanager/resourcemanager.h
index f63677d85..013eecdc2 100644
--- a/src/resources/resourcemanager/resourcemanager.h
+++ b/src/resources/resourcemanager/resourcemanager.h
@@ -147,7 +147,7 @@ class ResourceManager final : public MemoryCounter
*/
static void deleteInstance();
- int size() const A_WARN_UNUSED
+ int size() const noexcept2 A_WARN_UNUSED
{ return CAST_S32(mResources.size()); }
typedef std::map<std::string, Resource*> Resources;
diff --git a/src/resources/skill/skillinfo.h b/src/resources/skill/skillinfo.h
index 929d680b5..fbf0b2715 100644
--- a/src/resources/skill/skillinfo.h
+++ b/src/resources/skill/skillinfo.h
@@ -87,7 +87,7 @@ struct SkillInfo final
void addData(const int level, SkillData *const data);
- bool isUsable() const A_WARN_UNUSED
+ bool isUsable() const noexcept2 A_WARN_UNUSED
{
return type == SkillType::Attack
|| type == SkillType::Self
diff --git a/src/resources/sprite/animatedsprite.h b/src/resources/sprite/animatedsprite.h
index 27d6b61a5..bd81f1a4e 100644
--- a/src/resources/sprite/animatedsprite.h
+++ b/src/resources/sprite/animatedsprite.h
@@ -138,10 +138,10 @@ class AnimatedSprite final : public Sprite
#endif // UNITTESTS
#ifdef DEBUG_ANIMATIONS
- void setSpriteName(const std::string &restrict name)
+ void setSpriteName(const std::string &restrict name) noexcept2
{ mSpriteName = name; }
- std::string getSpriteName() const A_WARN_UNUSED
+ std::string getSpriteName() const noexcept2 A_WARN_UNUSED
{ return mSpriteName; }
#endif // DEBUG_ANIMATIONS
diff --git a/src/soundmanager.h b/src/soundmanager.h
index f6dc2622f..4efc24542 100644
--- a/src/soundmanager.h
+++ b/src/soundmanager.h
@@ -136,7 +136,7 @@ class SoundManager final : public ConfigListener
void volumeRestore() const;
- std::string getCurrentMusicFile() const A_WARN_UNUSED
+ std::string getCurrentMusicFile() const noexcept2 A_WARN_UNUSED
{ return mCurrentMusicFile; }
/**
diff --git a/src/text.h b/src/text.h
index 660a2df3b..d58594da8 100644
--- a/src/text.h
+++ b/src/text.h
@@ -59,10 +59,10 @@ class Text notfinal
void setColor(const Color *const color);
- int getWidth() const A_WARN_UNUSED
+ int getWidth() const noexcept2 A_WARN_UNUSED
{ return mWidth; }
- int getHeight() const A_WARN_UNUSED
+ int getHeight() const noexcept2 A_WARN_UNUSED
{ return mHeight; }
/**
@@ -78,10 +78,10 @@ class Text notfinal
// int getWidth() A_WARN_UNUSED;
- int getX() const A_WARN_UNUSED
+ int getX() const noexcept2 A_WARN_UNUSED
{ return mX; }
- int getY() const A_WARN_UNUSED
+ int getY() const noexcept2 A_WARN_UNUSED
{ return mY; }
private:
diff --git a/src/textcommand.h b/src/textcommand.h
index 230c926a0..82d3027fe 100644
--- a/src/textcommand.h
+++ b/src/textcommand.h
@@ -77,38 +77,38 @@ class TextCommand final
*/
~TextCommand();
- std::string getName() const A_WARN_UNUSED
+ std::string getName() const noexcept2 A_WARN_UNUSED
{ return mCommand; }
- std::string getCommand() const A_WARN_UNUSED
+ std::string getCommand() const noexcept2 A_WARN_UNUSED
{ return mCommand; }
- std::string getComment() const A_WARN_UNUSED
+ std::string getComment() const noexcept2 A_WARN_UNUSED
{ return mComment; }
- std::string getSymbol() const A_WARN_UNUSED
+ std::string getSymbol() const noexcept2 A_WARN_UNUSED
{ return mSymbol; }
- int getId() const A_WARN_UNUSED
+ int getId() const noexcept2 A_WARN_UNUSED
{ return mId; }
- CommandTargetT getTargetType() const A_WARN_UNUSED
+ CommandTargetT getTargetType() const noexcept2 A_WARN_UNUSED
{ return mTargetType; }
- std::string getIcon() const A_WARN_UNUSED
+ std::string getIcon() const noexcept2 A_WARN_UNUSED
{ return mIcon; }
#ifdef TMWA_SUPPORT
- unsigned int getMana() const A_WARN_UNUSED
+ unsigned int getMana() const noexcept2 A_WARN_UNUSED
{ return mMana; }
- MagicSchoolT getSchool() const A_WARN_UNUSED
+ MagicSchoolT getSchool() const noexcept2 A_WARN_UNUSED
{ return mSchool; }
- unsigned getBaseLvl() const A_WARN_UNUSED
+ unsigned getBaseLvl() const noexcept2 A_WARN_UNUSED
{ return mBaseLvl; }
- unsigned getSchoolLvl() const A_WARN_UNUSED
+ unsigned getSchoolLvl() const noexcept2 A_WARN_UNUSED
{ return mSchoolLvl; }
void setMana(const unsigned int mana)
@@ -123,7 +123,7 @@ class TextCommand final
void setSchoolLvl(const unsigned int schoolLvl)
{ mSchoolLvl = schoolLvl; }
- TextCommandTypeT getCommandType() const A_WARN_UNUSED
+ TextCommandTypeT getCommandType() const noexcept2 A_WARN_UNUSED
{ return mCommandType; }
void setCommandType(const TextCommandTypeT commandType)
@@ -148,10 +148,10 @@ class TextCommand final
void setIcon(const std::string &icon)
{ mIcon = icon; loadImage(); }
- bool isEmpty() const A_WARN_UNUSED
+ bool isEmpty() const noexcept2 A_WARN_UNUSED
{ return mCommand.empty() && mSymbol.empty(); }
- Image *getImage() const A_WARN_UNUSED
+ Image *getImage() const noexcept2 A_WARN_UNUSED
{ return mImage; }
private:
diff --git a/src/variabledata.h b/src/variabledata.h
index 28d42ba33..e504e9746 100644
--- a/src/variabledata.h
+++ b/src/variabledata.h
@@ -51,7 +51,7 @@ class IntData final : public VariableData
mData(value)
{ }
- int getData() const A_WARN_UNUSED
+ int getData() const noexcept2 A_WARN_UNUSED
{ return mData; }
int getType() const override final A_WARN_UNUSED
@@ -68,7 +68,7 @@ class StringData final : public VariableData
mData(value)
{ }
- const std::string &getData() const A_WARN_UNUSED
+ const std::string &getData() const noexcept2 A_WARN_UNUSED
{ return mData; }
int getType() const override final A_WARN_UNUSED
@@ -85,7 +85,7 @@ class FloatData final : public VariableData
mData(value)
{ }
- double getData() const A_WARN_UNUSED
+ double getData() const noexcept2 A_WARN_UNUSED
{ return mData; }
int getType() const override final A_WARN_UNUSED
@@ -102,7 +102,7 @@ class BoolData final : public VariableData
mData(value)
{ }
- bool getData() const A_WARN_UNUSED
+ bool getData() const noexcept2 A_WARN_UNUSED
{ return mData; }
int getType() const override final A_WARN_UNUSED
diff --git a/src/vector.h b/src/vector.h
index 7d72df517..6e23079f0 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -69,12 +69,12 @@ class Vector final
* Returns true if all coordinates are set to 0, otherwise returns
* false.
*/
- bool isNull() const A_WARN_UNUSED
+ bool isNull() const noexcept2 A_WARN_UNUSED
{
return x == 0.0F && y == 0.0F && z == 0.0F;
}
- Vector &operator=(const Vector &v)
+ Vector &operator=(const Vector &v) noexcept2
{
x = v.x;
y = v.y;
@@ -85,7 +85,7 @@ class Vector final
/**
* Scale vector operator.
*/
- Vector operator*(const float c) const A_WARN_UNUSED
+ Vector operator*(const float c) const noexcept2 A_WARN_UNUSED
{
return Vector(x * c,
y * c,
@@ -95,7 +95,7 @@ class Vector final
/**
* In-place scale vector operator.
*/
- Vector &operator*=(const float c)
+ Vector &operator*=(const float c) noexcept2
{
x *= c;
y *= c;
@@ -106,7 +106,7 @@ class Vector final
/**
* Scale vector operator.
*/
- Vector operator/(const float c) const A_WARN_UNUSED
+ Vector operator/(const float c) const noexcept2 A_WARN_UNUSED
{
return Vector(x / c,
y / c,
@@ -116,7 +116,7 @@ class Vector final
/**
* In-place scale vector operator.
*/
- Vector &operator/=(const float c) A_WARN_UNUSED
+ Vector &operator/=(const float c) noexcept2 A_WARN_UNUSED
{
x /= c;
y /= c;
@@ -127,7 +127,7 @@ class Vector final
/**
* Add vector operator.
*/
- Vector operator+(const Vector &v) const A_WARN_UNUSED
+ Vector operator+(const Vector &v) const noexcept2 A_WARN_UNUSED
{
return Vector(x + v.x,
y + v.y,
@@ -137,7 +137,7 @@ class Vector final
/**
* In-place add vector operator.
*/
- Vector &operator+=(const Vector &v)
+ Vector &operator+=(const Vector &v) noexcept2
{
x += v.x;
y += v.y;
@@ -148,7 +148,7 @@ class Vector final
/**
* Subtract vector operator.
*/
- Vector operator-(const Vector &v) const A_WARN_UNUSED
+ Vector operator-(const Vector &v) const noexcept2 A_WARN_UNUSED
{
return Vector(x - v.x,
y - v.y,
@@ -158,7 +158,7 @@ class Vector final
/**
* In-place subtract vector operator.
*/
- Vector &operator-=(const Vector &v)
+ Vector &operator-=(const Vector &v) noexcept2
{
x -= v.x;
y -= v.y;
@@ -178,7 +178,7 @@ class Vector final
/**
* Returns the squared length of this vector. Avoids the square root.
*/
- float squaredLength() const A_WARN_UNUSED
+ float squaredLength() const noexcept2 A_WARN_UNUSED
{
return x * x + y * y + z * z;
}