From 003d52ce6ee5975c4bbea18dabeba2026c6d208b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 25 Jan 2020 12:14:59 +0100 Subject: [PATCH] AK: Vector::is_null() should always return false This is only used by the somewhat dubious templated String::copy(). An empty Vector should generate an empty String when copied, never a null String. --- AK/Vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/Vector.h b/AK/Vector.h index b199dfb77b..ed8b02b576 100644 --- a/AK/Vector.h +++ b/AK/Vector.h @@ -249,7 +249,7 @@ public: } // NOTE: Vector::is_null() exists for the benefit of String::copy(). - bool is_null() const { return is_empty(); } + bool is_null() const { return false; } bool is_empty() const { return size() == 0; } int size() const { return m_size; } int capacity() const { return m_capacity; }