浏览代码

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.
Brian Gianforcaro 3 年之前
父节点
当前提交
7d27798c8d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      AK/Stack.h

+ 2 - 2
AK/Stack.h

@@ -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;
     }