diff options
-rw-r--r-- | src/being/actorsprite.cpp | 2 | ||||
-rw-r--r-- | src/being/actorsprite.h | 2 | ||||
-rw-r--r-- | src/being/being.cpp | 2 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 4 | ||||
-rw-r--r-- | src/beingequipbackend.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.h | 2 | ||||
-rw-r--r-- | src/resources/loaders/atlasloader.cpp | 2 | ||||
-rw-r--r-- | src/resources/loaders/emptyatlasloader.cpp | 2 | ||||
-rw-r--r-- | src/resources/loaders/imagesetloader.cpp | 6 | ||||
-rw-r--r-- | src/resources/loaders/musicloader.cpp | 2 | ||||
-rw-r--r-- | src/resources/loaders/rescaledloader.cpp | 6 | ||||
-rw-r--r-- | src/resources/loaders/soundloader.cpp | 2 | ||||
-rw-r--r-- | src/resources/loaders/spritedefloader.cpp | 4 | ||||
-rw-r--r-- | src/resources/loaders/subimageloader.cpp | 8 | ||||
-rw-r--r-- | src/resources/loaders/subimagesetloader.cpp | 2 | ||||
-rw-r--r-- | src/resources/loaders/walklayerloader.cpp | 2 |
17 files changed, 30 insertions, 27 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index b5eed97d0..56b21288d 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -160,7 +160,7 @@ void ActorSprite::controlCustomParticle(Particle *const particle) } } -void ActorSprite::controlParticleDeleted(Particle *const particle) +void ActorSprite::controlParticleDeleted(const Particle *const particle) { if (particle) mChildParticleEffects.removeLocally(particle); diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index 5373b30dc..5f5bcbe5d 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -195,7 +195,7 @@ class ActorSprite notfinal : public CompoundSprite, public Actor mChildParticleEffects.size(); } - void controlParticleDeleted(Particle *const particle); + void controlParticleDeleted(const Particle *const particle); protected: /** diff --git a/src/being/being.cpp b/src/being/being.cpp index 2737f2b8a..3f58bbde6 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2625,7 +2625,7 @@ void Being::setSpriteId(const unsigned int slot, BeingSlot &beingSlot = mSlots[slot]; beingSlot.spriteId = id; - beingSlot.color = ""; + beingSlot.color.clear(); beingSlot.colorId = ItemColor_one; beingSlot.cardsId = CardsList(nullptr); recalcSpritesOrder(); diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 236b9cb4b..54865a6ae 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -1234,7 +1234,7 @@ void LocalPlayer::moveToTarget(int dist) bool gotPos(false); Path debugPath; - unsigned int limit(0); + size_t limit(0); if (dist == -1) { @@ -1299,7 +1299,7 @@ void LocalPlayer::moveToTarget(int dist) else { Position pos(0, 0); - unsigned int f = 0; + size_t f = 0; for (Path::const_iterator i = debugPath.begin(), i_fend = debugPath.end(); diff --git a/src/beingequipbackend.cpp b/src/beingequipbackend.cpp index 22459cc24..75f135409 100644 --- a/src/beingequipbackend.cpp +++ b/src/beingequipbackend.cpp @@ -41,20 +41,21 @@ BeingEquipBackend::BeingEquipBackend(Being *const being) { const int idx = inventoryHandler-> convertFromServerSlot(CAST_S32(f)); - const int id = being->mSlots[f].spriteId; + const BeingSlot &slot = being->mSlots[f]; + const int id = slot.spriteId; if (id > 0 && idx >= 0 && idx < EQUIPMENT_SIZE) { Item *const item = new Item(id, ItemType::Unknown, 1, 0, - being->mSlots[f].colorId, + slot.colorId, Identified_true, Damaged_false, Favorite_false, Equipm_true, Equipped_true); - const CardsList &cards = being->mSlots[f].cardsId; + const CardsList &cards = slot.cardsId; if (!cards.isEmpty()) item->setCards(&cards.cards[0], maxCards); mEquipment[idx] = item; diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 065a72df8..bd386f820 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -401,7 +401,7 @@ void ScrollArea::safeDraw(Graphics *const graphics) BLOCK_END("ScrollArea::draw") } -void ScrollArea::updateCalcFlag(Graphics *const graphics) +void ScrollArea::updateCalcFlag(const Graphics *const graphics) { if (!mRedraw) { diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h index b33a5a392..3432c34d8 100644 --- a/src/gui/widgets/scrollarea.h +++ b/src/gui/widgets/scrollarea.h @@ -466,7 +466,7 @@ class ScrollArea final : public BasicContainer, Image *getImageByState(Rect &dim, const BUTTON_DIR dir); - void updateCalcFlag(Graphics *const graphics) A_NONNULL(2); + void updateCalcFlag(const Graphics *const graphics) A_NONNULL(2); static int instances; static float mAlpha; diff --git a/src/resources/loaders/atlasloader.cpp b/src/resources/loaders/atlasloader.cpp index 4a0991c21..3d05972eb 100644 --- a/src/resources/loaders/atlasloader.cpp +++ b/src/resources/loaders/atlasloader.cpp @@ -34,7 +34,7 @@ struct AtlasLoader final { const std::string name; - const StringVect *files; + const StringVect *const files; static Resource *load(const void *const v) { diff --git a/src/resources/loaders/emptyatlasloader.cpp b/src/resources/loaders/emptyatlasloader.cpp index ca798d681..3b8ef9078 100644 --- a/src/resources/loaders/emptyatlasloader.cpp +++ b/src/resources/loaders/emptyatlasloader.cpp @@ -34,7 +34,7 @@ struct EmptyAtlasLoader final { const std::string name; - const StringVect *files; + const StringVect *const files; static Resource *load(const void *const v) { diff --git a/src/resources/loaders/imagesetloader.cpp b/src/resources/loaders/imagesetloader.cpp index 47c4dcb45..590739490 100644 --- a/src/resources/loaders/imagesetloader.cpp +++ b/src/resources/loaders/imagesetloader.cpp @@ -36,9 +36,9 @@ struct ImageSetLoader final { - std::string path; - int w; - int h; + const std::string path; + const int w; + const int h; static Resource *load(const void *const v) { if (!v) diff --git a/src/resources/loaders/musicloader.cpp b/src/resources/loaders/musicloader.cpp index f9dd0fb17..d994be547 100644 --- a/src/resources/loaders/musicloader.cpp +++ b/src/resources/loaders/musicloader.cpp @@ -35,7 +35,7 @@ namespace { struct ResourceLoader final { - std::string path; + const std::string path; static Resource *load(const void *const v) { diff --git a/src/resources/loaders/rescaledloader.cpp b/src/resources/loaders/rescaledloader.cpp index 80400d728..f9f11c9d6 100644 --- a/src/resources/loaders/rescaledloader.cpp +++ b/src/resources/loaders/rescaledloader.cpp @@ -35,9 +35,9 @@ namespace { struct RescaledLoader final { - const Image *image; - int width; - int height; + const Image *const image; + const int width; + const int height; static Resource *load(const void *const v) { if (!v) diff --git a/src/resources/loaders/soundloader.cpp b/src/resources/loaders/soundloader.cpp index 8c325db7c..7ec18063e 100644 --- a/src/resources/loaders/soundloader.cpp +++ b/src/resources/loaders/soundloader.cpp @@ -35,7 +35,7 @@ namespace { struct ResourceLoader final { - std::string path; + const std::string path; static Resource *load(const void *const v) { diff --git a/src/resources/loaders/spritedefloader.cpp b/src/resources/loaders/spritedefloader.cpp index d49955ac4..3cbb03652 100644 --- a/src/resources/loaders/spritedefloader.cpp +++ b/src/resources/loaders/spritedefloader.cpp @@ -36,8 +36,8 @@ namespace { struct SpriteDefLoader final { - std::string path; - int variant; + const std::string path; + const int variant; static Resource *load(const void *const v) { if (!v) diff --git a/src/resources/loaders/subimageloader.cpp b/src/resources/loaders/subimageloader.cpp index 0be91e942..5b014362b 100644 --- a/src/resources/loaders/subimageloader.cpp +++ b/src/resources/loaders/subimageloader.cpp @@ -35,9 +35,11 @@ namespace { struct SubImageLoader final { - Image *parent; - int x, y; - int width, height; + Image *const parent; + const int x; + const int y; + const int width; + const int height; static Resource *load(const void *const v) { if (!v) diff --git a/src/resources/loaders/subimagesetloader.cpp b/src/resources/loaders/subimagesetloader.cpp index 1b271b33f..649a4f223 100644 --- a/src/resources/loaders/subimagesetloader.cpp +++ b/src/resources/loaders/subimagesetloader.cpp @@ -36,7 +36,7 @@ namespace { struct SubImageSetLoader final { - Image *parent; + Image *const parent; int width; int height; static Resource *load(const void *const v) diff --git a/src/resources/loaders/walklayerloader.cpp b/src/resources/loaders/walklayerloader.cpp index e7ffa2275..73f451ad8 100644 --- a/src/resources/loaders/walklayerloader.cpp +++ b/src/resources/loaders/walklayerloader.cpp @@ -36,7 +36,7 @@ struct WalkLayerLoader final { const std::string name; - Map *map; + const Map *const map; static Resource *load(const void *const v) { |