Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenlib/BLI_vector.hh6
-rw-r--r--tests/gtests/blenlib/BLI_vector_test.cc10
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/BLI_vector.hh b/source/blender/blenlib/BLI_vector.hh
index 40dc876d5a5..49cf41c2005 100644
--- a/source/blender/blenlib/BLI_vector.hh
+++ b/source/blender/blenlib/BLI_vector.hh
@@ -427,7 +427,7 @@ class Vector {
/**
* Returns true when the vector contains no elements, otherwise false.
*/
- bool empty() const
+ bool is_empty() const
{
return m_begin == m_end;
}
@@ -438,7 +438,7 @@ class Vector {
*/
void remove_last()
{
- BLI_assert(!this->empty());
+ BLI_assert(!this->is_empty());
m_end--;
destruct(m_end);
UPDATE_VECTOR_SIZE(this);
@@ -449,7 +449,7 @@ class Vector {
*/
T pop_last()
{
- BLI_assert(!this->empty());
+ BLI_assert(!this->is_empty());
m_end--;
T value = std::move(*m_end);
destruct(m_end);
diff --git a/tests/gtests/blenlib/BLI_vector_test.cc b/tests/gtests/blenlib/BLI_vector_test.cc
index 1585b77675b..e5a1ca2b200 100644
--- a/tests/gtests/blenlib/BLI_vector_test.cc
+++ b/tests/gtests/blenlib/BLI_vector_test.cc
@@ -345,14 +345,14 @@ TEST(vector, RemoveLast)
EXPECT_EQ(vec.size(), 0);
}
-TEST(vector, Empty)
+TEST(vector, IsEmpty)
{
IntVector vec;
- EXPECT_TRUE(vec.empty());
+ EXPECT_TRUE(vec.is_empty());
vec.append(1);
- EXPECT_FALSE(vec.empty());
+ EXPECT_FALSE(vec.is_empty());
vec.remove_last();
- EXPECT_TRUE(vec.empty());
+ EXPECT_TRUE(vec.is_empty());
}
TEST(vector, RemoveReorder)
@@ -368,7 +368,7 @@ TEST(vector, RemoveReorder)
vec.remove_and_reorder(0);
EXPECT_EQ(vec[0], 7);
vec.remove_and_reorder(0);
- EXPECT_TRUE(vec.empty());
+ EXPECT_TRUE(vec.is_empty());
}
TEST(vector, RemoveFirstOccurrenceAndReorder)