Update std headers

This commit is contained in:
EnderIce2 2023-10-11 13:00:15 +03:00
parent 56358280a7
commit 54a47ad3a5
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
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;

View File

@ -22,15 +22,6 @@
#define __FENNIX_KERNEL_STD_H__
#include <types.h>
#include <stdexcept>
#include <atomic>
#include <vector>
#include <string>
#include <list>
#include <std/functional.hpp>
#include <std/smart_ptr.hpp>
#include <std/unordered_map.hpp>
#include <std/utility.hpp>
/**
* @brief // stub namespace for std::align_val_t and new operator

View File

@ -17,9 +17,9 @@
#ifdef DEBUG
#include <std.hpp>
#include <assert.h>
#include <vector>
#include <atomic>
void Test_std()
{