diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-24 18:26:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-24 18:26:52 +0300 |
commit | 67ee3168a45ea09a863de5be2e0a94cf1afbe6dc (patch) | |
tree | aa33639f3e70f81444b893bbbb99ab78f6beb2d6 /src/gui | |
parent | a602d5c2460b197866028cfb3d2aa2b7b3aea80c (diff) | |
download | ManaVerse-67ee3168a45ea09a863de5be2e0a94cf1afbe6dc.tar.gz ManaVerse-67ee3168a45ea09a863de5be2e0a94cf1afbe6dc.tar.bz2 ManaVerse-67ee3168a45ea09a863de5be2e0a94cf1afbe6dc.tar.xz ManaVerse-67ee3168a45ea09a863de5be2e0a94cf1afbe6dc.zip |
Fix compilation with clang.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fonts/font.h | 26 | ||||
-rw-r--r-- | src/gui/fonts/textchunk.cpp | 13 | ||||
-rw-r--r-- | src/gui/fonts/textchunk.h | 6 | ||||
-rw-r--r-- | src/gui/fonts/textchunklist.cpp | 6 | ||||
-rw-r--r-- | src/gui/fonts/textchunklist.h | 12 | ||||
-rw-r--r-- | src/gui/fonts/textchunksmall.h | 4 |
6 files changed, 34 insertions, 33 deletions
diff --git a/src/gui/fonts/font.h b/src/gui/fonts/font.h index 6066c491f..9fb64af29 100644 --- a/src/gui/fonts/font.h +++ b/src/gui/fonts/font.h @@ -95,13 +95,13 @@ class Font final void loadFont(std::string filename, const int size, - const int style = 0) restrict; + const int style = 0) restrict2; - int getWidth(const std::string &text) const restrict A_WARN_UNUSED; + int getWidth(const std::string &text) const restrict2 A_WARN_UNUSED; - int getHeight() const restrict A_WARN_UNUSED; + int getHeight() const restrict2 A_WARN_UNUSED; - const TextChunkList *getCache() const restrict A_CONST A_WARN_UNUSED; + const TextChunkList *getCache() const restrict2 A_CONST A_WARN_UNUSED; /** * @see Font::drawString @@ -111,26 +111,26 @@ class Font final const Color &restrict col2, const std::string &restrict text, const int x, - const int y) restrict A_NONNULL(2); + const int y) restrict2 A_NONNULL(2); - void clear() restrict; + void clear() restrict2; - void doClean() restrict; + void doClean() restrict2; - void slowLogic(const int rnd) restrict; + void slowLogic(const int rnd) restrict2; - int getCreateCounter() const restrict A_WARN_UNUSED + int getCreateCounter() const restrict2 A_WARN_UNUSED { return mCreateCounter; } - int getDeleteCounter() const restrict A_WARN_UNUSED + int getDeleteCounter() const restrict2 A_WARN_UNUSED { return mDeleteCounter; } int getStringIndexAt(const std::string &restrict text, - const int x) const restrict A_WARN_UNUSED; + const int x) const restrict2 A_WARN_UNUSED; - void generate(TextChunk &restrict chunk) restrict; + void generate(TextChunk &restrict chunk) restrict2; - void insertChunk(TextChunk *const chunk) restrict; + void insertChunk(TextChunk *const chunk) restrict2; static bool mSoftMode; diff --git a/src/gui/fonts/textchunk.cpp b/src/gui/fonts/textchunk.cpp index b88f4830e..707435ace 100644 --- a/src/gui/fonts/textchunk.cpp +++ b/src/gui/fonts/textchunk.cpp @@ -61,10 +61,10 @@ TextChunk::TextChunk() : #endif } -TextChunk::TextChunk(const std::string &text0, - const Color &color0, - const Color &color1, - Font *const font) : +TextChunk::TextChunk(const std::string &restrict text0, + const Color &restrict color0, + const Color &restrict color1, + Font *restrict const font) : img(nullptr), textFont(font), text(text0), @@ -86,13 +86,14 @@ TextChunk::~TextChunk() #endif } -bool TextChunk::operator==(const TextChunk &chunk) const +bool TextChunk::operator==(const TextChunk &restrict chunk) const { return (chunk.text == text && chunk.color == color && chunk.color2 == color2); } -void TextChunk::generate(TTF_Font *const font, const float alpha) +void TextChunk::generate(TTF_Font *restrict const font, + const float alpha) { BLOCK_START("TextChunk::generate") SDL_Color sdlCol; diff --git a/src/gui/fonts/textchunk.h b/src/gui/fonts/textchunk.h index 5224cd3e7..b06f2f4cd 100644 --- a/src/gui/fonts/textchunk.h +++ b/src/gui/fonts/textchunk.h @@ -49,12 +49,12 @@ class TextChunk final ~TextChunk(); - bool operator==(const TextChunk &restrict chunk) const restrict; + bool operator==(const TextChunk &restrict chunk) const restrict2; void generate(TTF_Font *restrict const font, - const float alpha) restrict; + const float alpha) restrict2; - void deleteImage() restrict; + void deleteImage() restrict2; Image *restrict img; Font *restrict textFont; diff --git a/src/gui/fonts/textchunklist.cpp b/src/gui/fonts/textchunklist.cpp index 9458bf947..2b613b2da 100644 --- a/src/gui/fonts/textchunklist.cpp +++ b/src/gui/fonts/textchunklist.cpp @@ -33,7 +33,7 @@ TextChunkList::TextChunkList() : { } -void TextChunkList::insertFirst(TextChunk *const item) +void TextChunkList::insertFirst(TextChunk *restrict const item) { TextChunk *restrict const oldFirst = start; if (start) @@ -49,7 +49,7 @@ void TextChunkList::insertFirst(TextChunk *const item) searchWidth[item->text] = item; } -void TextChunkList::moveToFirst(TextChunk *const item) +void TextChunkList::moveToFirst(TextChunk *restrict const item) { if (item == start) return; @@ -70,7 +70,7 @@ void TextChunkList::moveToFirst(TextChunk *const item) start = item; } -void TextChunkList::remove(const TextChunk *const item) +void TextChunkList::remove(const TextChunk *restrict const item) { if (!item) return; diff --git a/src/gui/fonts/textchunklist.h b/src/gui/fonts/textchunklist.h index f9cf97b92..ce68d3931 100644 --- a/src/gui/fonts/textchunklist.h +++ b/src/gui/fonts/textchunklist.h @@ -36,17 +36,17 @@ class TextChunkList final A_DELETE_COPY(TextChunkList) - void insertFirst(TextChunk *restrict const item) restrict A_NONNULL(2); + void insertFirst(TextChunk *restrict const item) restrict2 A_NONNULL(2); - void moveToFirst(TextChunk *restrict const item) restrict A_NONNULL(2); + void moveToFirst(TextChunk *restrict const item) restrict2 A_NONNULL(2); - void remove(const TextChunk *restrict const item) restrict; + void remove(const TextChunk *restrict const item) restrict2; - void removeBack() restrict; + void removeBack() restrict2; - void removeBack(int n) restrict; + void removeBack(int n) restrict2; - void clear() restrict; + void clear() restrict2; TextChunk *restrict start; TextChunk *restrict end; diff --git a/src/gui/fonts/textchunksmall.h b/src/gui/fonts/textchunksmall.h index cf0277547..73e4b96d3 100644 --- a/src/gui/fonts/textchunksmall.h +++ b/src/gui/fonts/textchunksmall.h @@ -36,8 +36,8 @@ class TextChunkSmall final TextChunkSmall(const TextChunkSmall &restrict old); - bool operator==(const TextChunkSmall &restrict chunk) const restrict; - bool operator<(const TextChunkSmall &restrict chunk) const restrict; + bool operator==(const TextChunkSmall &restrict chunk) const restrict2; + bool operator<(const TextChunkSmall &restrict chunk) const restrict2; std::string text; Color color; |