mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
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.
This commit is contained in:
parent
b648997d1f
commit
003d52ce6e
Notes:
sideshowbarker
2024-07-19 09:50:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/003d52ce6ee
1 changed files with 1 additions and 1 deletions
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue