From 6de6577e1c9f8fad2852abb3b850f563fb7a04c6 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Mon, 21 Jun 2021 13:35:09 +1000 Subject: Fix some warnings in unit tests. --- test/unit/testSplitVector.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/unit/testSplitVector.cxx') diff --git a/test/unit/testSplitVector.cxx b/test/unit/testSplitVector.cxx index 8320d5bcb..aa855f1b1 100644 --- a/test/unit/testSplitVector.cxx +++ b/test/unit/testSplitVector.cxx @@ -25,7 +25,7 @@ using namespace Scintilla::Internal; struct StringSetHolder { SplitVector sa; - bool Check() { + bool Check() const noexcept { for (int i = 0; i < sa.Length(); i++) { if (sa[i].empty()) { return false; @@ -35,7 +35,7 @@ struct StringSetHolder { } }; -const int lengthTestArray = 4; +constexpr int lengthTestArray = 4; static const int testArray[4] = {3, 4, 5, 6}; TEST_CASE("SplitVector") { @@ -279,7 +279,7 @@ TEST_CASE("SplitVector") { SECTION("ReplaceUp") { // Replace each element by inserting and then deleting the displaced element // This should perform many moves - const int testLength=105; + constexpr int testLength=105; sv.EnsureLength(testLength); for (int i=0; i