From c430b75e370a21a17f80d4ba3acd84111828a462 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 26 Sep 2013 20:08:44 +0300 Subject: add const for methods return values. --- src/resources/dye.h | 4 ++-- src/resources/openglimagehelper.cpp | 4 ++-- src/resources/spritedef.cpp | 4 ++-- src/resources/spritedef.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/resources') diff --git a/src/resources/dye.h b/src/resources/dye.h index ba0b378d0..c5e60b520 100644 --- a/src/resources/dye.h +++ b/src/resources/dye.h @@ -116,13 +116,13 @@ class Dye final /** * Return special dye palete (S) */ - DyePalette *getSPalete() const A_WARN_UNUSED + const DyePalette *getSPalete() const A_WARN_UNUSED { return mDyePalettes[sPaleteIndex]; } /** * Return special dye palete (A) */ - DyePalette *getAPalete() const A_WARN_UNUSED + const DyePalette *getAPalete() const A_WARN_UNUSED { return mDyePalettes[aPaleteIndex]; } /** diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index ba9931f55..a036a7e0e 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -67,14 +67,14 @@ Image *OpenGLImageHelper::load(SDL_RWops *const rw, Dye const &dye) const { case 1: { - DyePalette *const pal = dye.getSPalete(); + const DyePalette *const pal = dye.getSPalete(); if (pal) pal->replaceSOGLColor(pixels, surf->w * surf->h); break; } case 2: { - DyePalette *const pal = dye.getAPalete(); + const DyePalette *const pal = dye.getAPalete(); if (pal) pal->replaceAOGLColor(pixels, surf->w * surf->h); break; diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index a855e90ba..af0ada0dc 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -37,8 +37,8 @@ SpriteReference *SpriteReference::Empty = nullptr; extern int serverVersion; -Action *SpriteDef::getAction(const std::string &action, - const unsigned num) const +const Action *SpriteDef::getAction(const std::string &action, + const unsigned num) const { Actions::const_iterator i = mActions.find(num); if (i == mActions.end() && num != 100) diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h index 533042c02..f7415e187 100644 --- a/src/resources/spritedef.h +++ b/src/resources/spritedef.h @@ -145,8 +145,8 @@ class SpriteDef final : public Resource /** * Returns the specified action. */ - Action *getAction(const std::string &action, - const unsigned num) const A_WARN_UNUSED; + const Action *getAction(const std::string &action, + const unsigned num) const A_WARN_UNUSED; unsigned findNumber(const unsigned num) const A_WARN_UNUSED; -- cgit v1.2.3-70-g09d2