mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-25 22:14:37 +00:00
Update std headers
This commit is contained in:
parent
56358280a7
commit
54a47ad3a5
@ -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;
|
||||
|
@ -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
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#include <std.hpp>
|
||||
#include <assert.h>
|
||||
#include <vector>
|
||||
#include <atomic>
|
||||
|
||||
void Test_std()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user