summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-18 12:02:28 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-18 12:02:28 +0300
commit6ee2ea09ced2da9bd556cd9ab5db63161161a29e (patch)
tree335f04e508ee5df479c87b1f5355bbdee9b6046d
parentd2d0f28dc720f138e00ceeb70ccb9a68553b98c8 (diff)
downloadmanaverse-6ee2ea09ced2da9bd556cd9ab5db63161161a29e.tar.gz
manaverse-6ee2ea09ced2da9bd556cd9ab5db63161161a29e.tar.bz2
manaverse-6ee2ea09ced2da9bd556cd9ab5db63161161a29e.tar.xz
manaverse-6ee2ea09ced2da9bd556cd9ab5db63161161a29e.zip
add restrict into sdlcheckutils.
-rw-r--r--src/utils/sdlcheckutils.cpp19
-rw-r--r--src/utils/sdlcheckutils.h6
2 files changed, 13 insertions, 12 deletions
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<void*, MemoryObject*> 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,