From 6ee2ea09ced2da9bd556cd9ab5db63161161a29e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 18 Dec 2013 12:02:28 +0300 Subject: add restrict into sdlcheckutils. --- src/utils/sdlcheckutils.cpp | 19 ++++++++++--------- src/utils/sdlcheckutils.h | 6 +++--- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'src/utils') diff --git a/src/utils/sdlcheckutils.cpp b/src/utils/sdlcheckutils.cpp index 7140e44fe..a3524aa91 100644 --- a/src/utils/sdlcheckutils.cpp +++ b/src/utils/sdlcheckutils.cpp @@ -54,9 +54,9 @@ struct MemoryObject std::map mSurfaces; -static SDL_Surface *addSurface(const char *const name, - SDL_Surface *const surface, - const char *const file, +static SDL_Surface *addSurface(const char *restrict const name, + SDL_Surface *restrict const surface, + const char *restrict const file, const unsigned line) { #ifdef DEBUG_SURFACE_ALLOCATION @@ -85,9 +85,9 @@ static SDL_Surface *addSurface(const char *const name, return surface; } -static void deleteSurface(const char *const name A_UNUSED, - SDL_Surface *const surface, - const char *const file, +static void deleteSurface(const char *restrict const name A_UNUSED, + SDL_Surface *restrict const surface, + const char *restrict const file, const unsigned line) { #ifdef DEBUG_SURFACE_ALLOCATION @@ -159,7 +159,8 @@ void FakeSDL_FreeSurface(SDL_Surface *const surface, const char *const file, SDL_Surface *FakeSDL_CreateRGBSurface(const uint32_t flags, const int width, const int height, - const int depth, const uint32_t rMask, + const int depth, + const uint32_t rMask, const uint32_t gMask, const uint32_t bMask, const uint32_t aMask, @@ -181,9 +182,9 @@ SDL_Surface *FakeSDL_ConvertSurface(SDL_Surface *const src, } SDL_Surface *FakeTTF_RenderUTF8_Blended(_TTF_Font *const font, - const char *const text, + const char *restrict const text, const SDL_Color &fg, - const char *const file, + const char *restrict const file, const unsigned line) { return addSurface("TTF_RenderUTF8_Blended", TTF_RenderUTF8_Blended( diff --git a/src/utils/sdlcheckutils.h b/src/utils/sdlcheckutils.h index a2f9bb90a..069a37057 100644 --- a/src/utils/sdlcheckutils.h +++ b/src/utils/sdlcheckutils.h @@ -57,10 +57,10 @@ SDL_Surface *FakeSDL_ConvertSurface(SDL_Surface *const src, const char *const file, const unsigned line); -SDL_Surface *FakeTTF_RenderUTF8_Blended(_TTF_Font *const font, - const char *const text, +SDL_Surface *FakeTTF_RenderUTF8_Blended(_TTF_Font *restrict const font, + const char *restrict const text, const SDL_Color &fg, - const char *const file, + const char *restrict const file, const unsigned line); SDL_Surface *FakeIMG_Load(const char *name, const char *const file, -- cgit v1.2.3-70-g09d2