summaryrefslogtreecommitdiff
path: root/src/gui/fonts/textchunklist.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-24 01:44:47 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-24 01:44:47 +0300
commit080d5b0432549af7739cab604315f08c41ee26a3 (patch)
tree1c52c54beb400a0c5eab9ba7fe669fd4ee52f52b /src/gui/fonts/textchunklist.cpp
parent8cf035f1eded9e002d73353fa7087902f092cf1f (diff)
downloadmanaplus-080d5b0432549af7739cab604315f08c41ee26a3.tar.gz
manaplus-080d5b0432549af7739cab604315f08c41ee26a3.tar.bz2
manaplus-080d5b0432549af7739cab604315f08c41ee26a3.tar.xz
manaplus-080d5b0432549af7739cab604315f08c41ee26a3.zip
Add restrict keyword in textchunklist.
Diffstat (limited to 'src/gui/fonts/textchunklist.cpp')
-rw-r--r--src/gui/fonts/textchunklist.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/fonts/textchunklist.cpp b/src/gui/fonts/textchunklist.cpp
index 24b46bea0..9458bf947 100644
--- a/src/gui/fonts/textchunklist.cpp
+++ b/src/gui/fonts/textchunklist.cpp
@@ -35,7 +35,7 @@ TextChunkList::TextChunkList() :
void TextChunkList::insertFirst(TextChunk *const item)
{
- TextChunk *const oldFirst = start;
+ TextChunk *restrict const oldFirst = start;
if (start)
start->prev = item;
item->prev = nullptr;
@@ -54,15 +54,15 @@ void TextChunkList::moveToFirst(TextChunk *const item)
if (item == start)
return;
- TextChunk *const oldPrev = item->prev;
+ TextChunk *restrict const oldPrev = item->prev;
if (oldPrev)
oldPrev->next = item->next;
- TextChunk *const oldNext = item->next;
+ TextChunk *restrict const oldNext = item->next;
if (oldNext)
oldNext->prev = item->prev;
else
end = oldPrev;
- TextChunk *const oldFirst = start;
+ TextChunk *restrict const oldFirst = start;
if (start)
start->prev = item;
item->prev = nullptr;
@@ -75,8 +75,8 @@ void TextChunkList::remove(const TextChunk *const item)
if (!item)
return;
- TextChunk *const oldPrev = item->prev;
- TextChunk *const oldNext = item->next;
+ TextChunk *restrict const oldPrev = item->prev;
+ TextChunk *restrict const oldNext = item->next;
if (oldPrev)
oldPrev->next = item->next;
else
@@ -94,7 +94,7 @@ void TextChunkList::remove(const TextChunk *const item)
void TextChunkList::removeBack()
{
- TextChunk *oldEnd = end;
+ TextChunk *restrict oldEnd = end;
if (oldEnd)
{
end = oldEnd->prev;
@@ -112,7 +112,7 @@ void TextChunkList::removeBack()
void TextChunkList::removeBack(int n)
{
- TextChunk *item = end;
+ TextChunk *restrict item = end;
while (n && item)
{
n --;
@@ -140,10 +140,10 @@ void TextChunkList::clear()
{
search.clear();
searchWidth.clear();
- TextChunk *item = start;
+ TextChunk *restrict item = start;
while (item)
{
- TextChunk *const item2 = item->next;
+ TextChunk *restrict const item2 = item->next;
delete item;
item = item2;
}