summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-01-25 12:14:59 +0100
committerAndreas Kling <kling@serenityos.org>2020-01-25 12:14:59 +0100
commit003d52ce6ee5975c4bbea18dabeba2026c6d208b (patch)
tree939895d1dd94709be325b88ff6c0c8ba12bafd77 /AK
parentb648997d1f89f5affc84f88ea8dc5f5698367250 (diff)
downloadserenity-003d52ce6ee5975c4bbea18dabeba2026c6d208b.zip
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.
Diffstat (limited to 'AK')
-rw-r--r--AK/Vector.h2
1 files changed, 1 insertions, 1 deletions
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; }