Update std headers

This commit is contained in:
EnderIce2
2023-10-11 13:00:15 +03:00
parent 56358280a7
commit 54a47ad3a5
3 changed files with 7 additions and 16 deletions

View File

@ -18,7 +18,6 @@
#pragma once
#include <types.h>
#include <stdexcept>
namespace std
{
@ -62,9 +61,9 @@ namespace std
void pop_back()
{
if (empty())
if (unlikely(empty()))
{
throw std::runtime_error("list is empty");
assert(!"list is empty");
}
else if (head == tail)
{
@ -99,11 +98,12 @@ namespace std
void pop_front()
{
if (empty())
if (unlikely(empty()))
{
throw std::runtime_error("list is empty");
assert(!"list is empty");
}
else if (head == tail)
if (head == tail)
{
delete head;
head = tail = nullptr;