mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Use unchecked_append in AK::Stack, as we always validate the size
This removes one additional usage of Vector::append that stops us from disabling it when compiling the Kernel.
This commit is contained in:
parent
48c9350036
commit
7d27798c8d
Notes:
sideshowbarker
2024-07-17 21:36:25 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/7d27798c8d8 Pull-request: https://github.com/SerenityOS/serenity/pull/11588
1 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ public:
|
|||
if (m_stack.size() >= stack_size)
|
||||
return false;
|
||||
|
||||
m_stack.append(item);
|
||||
m_stack.unchecked_append(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ public:
|
|||
if (m_stack.size() >= stack_size)
|
||||
return false;
|
||||
|
||||
m_stack.append(move(item));
|
||||
m_stack.unchecked_append(move(item));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue