diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-12-12 20:26:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-12-12 20:26:59 +0300 |
commit | bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43 (patch) | |
tree | 4d631106f76ba8a052dc2ef8b23b8a968040db82 /src/resources | |
parent | 67638eeec5267977940dce29c5a94ce4d093ed69 (diff) | |
download | mv-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.gz mv-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.bz2 mv-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.xz mv-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.zip |
Add noexcept in some files.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/beinginfo.h | 78 | ||||
-rw-r--r-- | src/resources/image/image.h | 26 | ||||
-rw-r--r-- | src/resources/image/subimage.h | 2 | ||||
-rw-r--r-- | src/resources/imageset.h | 16 | ||||
-rw-r--r-- | src/resources/inventory/inventory.h | 8 | ||||
-rw-r--r-- | src/resources/item/cardslist.h | 2 | ||||
-rw-r--r-- | src/resources/item/complexitem.h | 2 | ||||
-rw-r--r-- | src/resources/item/item.h | 60 | ||||
-rw-r--r-- | src/resources/item/shopitem.h | 14 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 110 | ||||
-rw-r--r-- | src/resources/map/mapitem.h | 14 | ||||
-rw-r--r-- | src/resources/map/tileset.h | 5 | ||||
-rw-r--r-- | src/resources/modinfo.h | 14 | ||||
-rw-r--r-- | src/resources/resource.h | 18 | ||||
-rw-r--r-- | src/resources/resourcemanager/resourcemanager.h | 2 | ||||
-rw-r--r-- | src/resources/skill/skillinfo.h | 2 | ||||
-rw-r--r-- | src/resources/sprite/animatedsprite.h | 4 |
17 files changed, 189 insertions, 188 deletions
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 |