From ff516e9f60e9554e8938d04192a8e5ec9efb5647 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 15 Mar 2014 00:26:35 +0300 Subject: fix code style. --- src/resources/imagehelper.cpp | 5 +++-- src/resources/imagehelper.h | 3 ++- src/resources/openglimagehelper.cpp | 3 ++- src/resources/sdl2imagehelper.h | 12 ------------ src/resources/sdl2softwareimagehelper.h | 12 ------------ src/resources/surfaceimagehelper.h | 12 ------------ 6 files changed, 7 insertions(+), 40 deletions(-) (limited to 'src/resources') diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp index 0fbc04776..d72550767 100644 --- a/src/resources/imagehelper.cpp +++ b/src/resources/imagehelper.cpp @@ -84,7 +84,7 @@ Image *ImageHelper::load(SDL_RWops *const rw, Dye const &dye) const tmpImage, &rgba, SDL_SWSURFACE); MSDL_FreeSurface(tmpImage); - uint32_t *pixels = static_cast(surf->pixels); + uint32_t *const pixels = static_cast(surf->pixels); const int type = dye.getType(); switch (type) @@ -203,7 +203,8 @@ SDL_Surface *ImageHelper::loadPng(SDL_RWops *const rw) return nullptr; } -SDL_Surface *ImageHelper::create32BitSurface(int width, int height) const +SDL_Surface *ImageHelper::create32BitSurface(int width, + int height) const { #if SDL_BYTEORDER == SDL_BIG_ENDIAN const int rmask = 0xff000000; diff --git a/src/resources/imagehelper.h b/src/resources/imagehelper.h index e7ec4cfad..f68d8c147 100644 --- a/src/resources/imagehelper.h +++ b/src/resources/imagehelper.h @@ -81,7 +81,8 @@ class ImageHelper static void dumpSurfaceFormat(const SDL_Surface *const image); - virtual SDL_Surface *create32BitSurface(int width, int height) + virtual SDL_Surface *create32BitSurface(int width, + int height) const A_WARN_UNUSED; static void setEnableAlpha(const bool n) diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 5a0a91fc1..262d839f7 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -290,7 +290,8 @@ void OpenGLImageHelper::initTextureSampler(const GLint id) } } -SDL_Surface *OpenGLImageHelper::create32BitSurface(int width, int height) const +SDL_Surface *OpenGLImageHelper::create32BitSurface(int width, + int height) const { #if SDL_BYTEORDER == SDL_BIG_ENDIAN const int rmask = 0xff000000; diff --git a/src/resources/sdl2imagehelper.h b/src/resources/sdl2imagehelper.h index 44f81c433..296b50f8a 100644 --- a/src/resources/sdl2imagehelper.h +++ b/src/resources/sdl2imagehelper.h @@ -51,18 +51,6 @@ class SDLImageHelper final : public ImageHelper ~SDLImageHelper() { } - /** - * Loads an image from an SDL_RWops structure and recolors it. - * - * @param rw The SDL_RWops to load the image from. - * @param dye The dye used to recolor the image. - * - * @return NULL if an error occurred, a valid pointer - * otherwise. - */ - Image *load(SDL_RWops *const rw, - Dye const &dye) const override final A_WARN_UNUSED; - /** * Loads an image from an SDL surface. */ diff --git a/src/resources/sdl2softwareimagehelper.h b/src/resources/sdl2softwareimagehelper.h index 01d6428b5..41af65fdb 100644 --- a/src/resources/sdl2softwareimagehelper.h +++ b/src/resources/sdl2softwareimagehelper.h @@ -51,18 +51,6 @@ class SDL2SoftwareImageHelper final : public ImageHelper ~SDL2SoftwareImageHelper() { } - /** - * Loads an image from an SDL_RWops structure and recolors it. - * - * @param rw The SDL_RWops to load the image from. - * @param dye The dye used to recolor the image. - * - * @return NULL if an error occurred, a valid pointer - * otherwise. - */ - Image *load(SDL_RWops *const rw, - Dye const &dye) const override final A_WARN_UNUSED; - /** * Loads an image from an SDL surface. */ diff --git a/src/resources/surfaceimagehelper.h b/src/resources/surfaceimagehelper.h index b526c9b64..3e595009e 100644 --- a/src/resources/surfaceimagehelper.h +++ b/src/resources/surfaceimagehelper.h @@ -53,18 +53,6 @@ class SurfaceImageHelper final : public ImageHelper ~SurfaceImageHelper() { } - /** - * Loads an image from an SDL_RWops structure and recolors it. - * - * @param rw The SDL_RWops to load the image from. - * @param dye The dye used to recolor the image. - * - * @return NULL if an error occurred, a valid pointer - * otherwise. - */ - Image *load(SDL_RWops *const rw, - Dye const &dye) const override final A_WARN_UNUSED; - /** * Loads an image from an SDL surface. */ -- cgit v1.2.3-60-g2f50