diff options
author | Andreas Kling <kling@serenityos.org> | 2020-01-25 12:14:59 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-25 12:14:59 +0100 |
commit | 003d52ce6ee5975c4bbea18dabeba2026c6d208b (patch) | |
tree | 939895d1dd94709be325b88ff6c0c8ba12bafd77 /AK | |
parent | b648997d1f89f5affc84f88ea8dc5f5698367250 (diff) | |
download | serenity-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.h | 2 |
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; } |