summaryrefslogtreecommitdiff
path: root/src/gui/fonts
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-08 01:22:43 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-08 01:22:43 +0300
commit34a83475636164cf43551d9ec83ec30da5a7e7f2 (patch)
treec6b3e22f789422e06a96c2ca87dd94fc61eb1dd1 /src/gui/fonts
parentaf4fcff19a986990d58c50c62bc498690c8293b8 (diff)
downloadmanaplus-34a83475636164cf43551d9ec83ec30da5a7e7f2.tar.gz
manaplus-34a83475636164cf43551d9ec83ec30da5a7e7f2.tar.bz2
manaplus-34a83475636164cf43551d9ec83ec30da5a7e7f2.tar.xz
manaplus-34a83475636164cf43551d9ec83ec30da5a7e7f2.zip
Replace size() to empty() where is possible
Diffstat (limited to 'src/gui/fonts')
-rw-r--r--src/gui/fonts/textchunklist_unittest.cc38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/gui/fonts/textchunklist_unittest.cc b/src/gui/fonts/textchunklist_unittest.cc
index a06ec2785..1c0330dce 100644
--- a/src/gui/fonts/textchunklist_unittest.cc
+++ b/src/gui/fonts/textchunklist_unittest.cc
@@ -32,8 +32,8 @@ TEST_CASE("TextChunkList empty", "TextChunkList")
REQUIRE(0 == list.size);
REQUIRE(nullptr == list.start);
REQUIRE(nullptr == list.end);
- REQUIRE(0 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.search.empty());
+ REQUIRE(list.searchWidth.empty());
}
TEST_CASE("TextChunkList add 1", "TextChunkList")
@@ -105,8 +105,8 @@ TEST_CASE("TextChunkList addRemoveBack 1", "TextChunkList")
REQUIRE(0 == list.size);
REQUIRE(nullptr == list.start);
REQUIRE(nullptr == list.end);
- REQUIRE(0 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.search.empty());
+ REQUIRE(list.searchWidth.empty());
}
TEST_CASE("TextChunkList addRemoveBack 2", "TextChunkList")
@@ -154,8 +154,8 @@ TEST_CASE("TextChunkList addRemoveBack 3", "TextChunkList")
REQUIRE(nullptr == list.start);
REQUIRE(nullptr == list.end);
- REQUIRE(0 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.search.empty());
+ REQUIRE(list.searchWidth.empty());
}
TEST_CASE("TextChunkList addRemoveBack 4", "TextChunkList")
@@ -185,7 +185,7 @@ TEST_CASE("TextChunkList addRemoveBack 4", "TextChunkList")
REQUIRE(chunk1 == (*list.search.find(TextChunkSmall(
chunk1->text, chunk1->color, chunk1->color2))).second);
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.searchWidth.empty());
delete chunk1;
}
@@ -306,8 +306,8 @@ TEST_CASE("TextChunkList clear 1", "TextChunkList")
REQUIRE(nullptr == list.start);
REQUIRE(nullptr == list.end);
REQUIRE(chunksLeft == textChunkCnt);
- REQUIRE(0 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.search.empty());
+ REQUIRE(list.searchWidth.empty());
}
TEST_CASE("TextChunkList clear 2", "TextChunkList")
@@ -331,8 +331,8 @@ TEST_CASE("TextChunkList clear 2", "TextChunkList")
REQUIRE(nullptr == list.start);
REQUIRE(nullptr == list.end);
REQUIRE(chunksLeft == textChunkCnt);
- REQUIRE(0 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.search.empty());
+ REQUIRE(list.searchWidth.empty());
}
TEST_CASE("TextChunkList clear 3", "TextChunkList")
@@ -358,12 +358,12 @@ TEST_CASE("TextChunkList clear 3", "TextChunkList")
list.removeBack();
REQUIRE((chunksLeft + 2) == textChunkCnt);
REQUIRE(2 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.searchWidth.empty());
list.clear();
REQUIRE(chunksLeft == textChunkCnt);
- REQUIRE(0 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.search.empty());
+ REQUIRE(list.searchWidth.empty());
}
TEST_CASE("TextChunkList clear 4", "TextChunkList")
@@ -389,12 +389,12 @@ TEST_CASE("TextChunkList clear 4", "TextChunkList")
list.removeBack(2);
REQUIRE((chunksLeft + 1) == textChunkCnt);
REQUIRE(1 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.searchWidth.empty());
list.clear();
REQUIRE(chunksLeft == textChunkCnt);
- REQUIRE(0 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.search.empty());
+ REQUIRE(list.searchWidth.empty());
}
TEST_CASE("TextChunkList remove 1", "TextChunkList")
@@ -413,8 +413,8 @@ TEST_CASE("TextChunkList remove 1", "TextChunkList")
REQUIRE(nullptr == list.start);
REQUIRE(nullptr == list.end);
REQUIRE(chunksLeft == textChunkCnt);
- REQUIRE(0 == list.search.size());
- REQUIRE(0 == list.searchWidth.size());
+ REQUIRE(list.search.empty());
+ REQUIRE(list.searchWidth.empty());
}
TEST_CASE("TextChunkList remove 2", "TextChunkList")