summaryrefslogtreecommitdiff
path: root/src/gui/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/fonts')
-rw-r--r--src/gui/fonts/textchunk.cpp2
-rw-r--r--src/gui/fonts/textchunk.h23
2 files changed, 13 insertions, 12 deletions
diff --git a/src/gui/fonts/textchunk.cpp b/src/gui/fonts/textchunk.cpp
index a0c8a39dc..b88f4830e 100644
--- a/src/gui/fonts/textchunk.cpp
+++ b/src/gui/fonts/textchunk.cpp
@@ -41,7 +41,7 @@ namespace
const int OUTLINE_SIZE = 1;
} // namespace
-char *strBuf = nullptr;
+char *restrict strBuf = nullptr;
#ifdef UNITTESTS
int textChunkCnt = 0;
diff --git a/src/gui/fonts/textchunk.h b/src/gui/fonts/textchunk.h
index 6b8beec35..5224cd3e7 100644
--- a/src/gui/fonts/textchunk.h
+++ b/src/gui/fonts/textchunk.h
@@ -40,28 +40,29 @@ class TextChunk final
public:
TextChunk();
- TextChunk(const std::string &text0,
- const Color &color0,
- const Color &color1,
- Font *const font);
+ TextChunk(const std::string &restrict text0,
+ const Color &restrict color0,
+ const Color &restrict color1,
+ Font *restrict const font);
A_DELETE_COPY(TextChunk)
~TextChunk();
- bool operator==(const TextChunk &chunk) const;
+ bool operator==(const TextChunk &restrict chunk) const restrict;
- void generate(TTF_Font *const font, const float alpha);
+ void generate(TTF_Font *restrict const font,
+ const float alpha) restrict;
- void deleteImage();
+ void deleteImage() restrict;
- Image *img;
- Font *textFont;
+ Image *restrict img;
+ Font *restrict textFont;
std::string text;
Color color;
Color color2;
- TextChunk *prev;
- TextChunk *next;
+ TextChunk *restrict prev;
+ TextChunk *restrict next;
};
#ifdef UNITTESTS