mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Update std headers
This commit is contained in:
parent
56358280a7
commit
54a47ad3a5
@ -18,7 +18,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
#include <stdexcept>
|
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
@ -62,9 +61,9 @@ namespace std
|
|||||||
|
|
||||||
void pop_back()
|
void pop_back()
|
||||||
{
|
{
|
||||||
if (empty())
|
if (unlikely(empty()))
|
||||||
{
|
{
|
||||||
throw std::runtime_error("list is empty");
|
assert(!"list is empty");
|
||||||
}
|
}
|
||||||
else if (head == tail)
|
else if (head == tail)
|
||||||
{
|
{
|
||||||
@ -99,11 +98,12 @@ namespace std
|
|||||||
|
|
||||||
void pop_front()
|
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;
|
delete head;
|
||||||
head = tail = nullptr;
|
head = tail = nullptr;
|
||||||
|
@ -22,15 +22,6 @@
|
|||||||
#define __FENNIX_KERNEL_STD_H__
|
#define __FENNIX_KERNEL_STD_H__
|
||||||
|
|
||||||
#include <types.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
|
* @brief // stub namespace for std::align_val_t and new operator
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
#include <std.hpp>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
void Test_std()
|
void Test_std()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user