diff options
author | Andreas Kling <kling@serenityos.org> | 2021-06-12 13:24:45 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-12 13:24:45 +0200 |
commit | dc65f54c065364225f0113a9339af72735547779 (patch) | |
tree | 60a8b9d37c6236748bfa310a564150d688595183 /AK/Vector.h | |
parent | 7e1bffdeb85c832c7cea1a71e2c9e9ebe7ff96ae (diff) | |
download | serenity-dc65f54c065364225f0113a9339af72735547779.zip |
AK: Rename Vector::append(Vector) => Vector::extend(Vector)
Let's make it a bit more clear when we're appending the elements from
one vector to the end of another vector.
Diffstat (limited to 'AK/Vector.h')
-rw-r--r-- | AK/Vector.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/AK/Vector.h b/AK/Vector.h index 609c589fc3..716fa5ff13 100644 --- a/AK/Vector.h +++ b/AK/Vector.h @@ -227,15 +227,15 @@ public: VERIFY(did_allocate); } - void append(Vector&& other) + void extend(Vector&& other) { - auto did_allocate = try_append(move(other)); + auto did_allocate = try_extend(move(other)); VERIFY(did_allocate); } - void append(Vector const& other) + void extend(Vector const& other) { - auto did_allocate = try_append(other); + auto did_allocate = try_extend(other); VERIFY(did_allocate); } @@ -506,7 +506,7 @@ public: return true; } - [[nodiscard]] bool try_append(Vector&& other) + [[nodiscard]] bool try_extend(Vector&& other) { if (is_empty()) { *this = move(other); @@ -521,7 +521,7 @@ public: return true; } - [[nodiscard]] bool try_append(Vector const& other) + [[nodiscard]] bool try_extend(Vector const& other) { if (!try_grow_capacity(size() + other.size())) return false; |