BAN: Cleanup includes
This commit is contained in:
parent
a7a55cd0fb
commit
cf63552b2a
|
@ -0,0 +1,13 @@
|
||||||
|
#include <BAN/Memory.h>
|
||||||
|
|
||||||
|
namespace std { enum class align_val_t : size_t {}; }
|
||||||
|
|
||||||
|
void* operator new(size_t size) { return BAN::allocator(size); }
|
||||||
|
void* operator new[](size_t size) { return BAN::allocator(size); }
|
||||||
|
void* operator new(size_t size, std::align_val_t align) { return BAN::allocator_align(size, (size_t)align); }
|
||||||
|
void* operator new[](size_t size, std::align_val_t align) { return BAN::allocator_align(size, (size_t)align); }
|
||||||
|
|
||||||
|
void operator delete(void* addr) { BAN::deallocator(addr); }
|
||||||
|
void operator delete[](void* addr) { BAN::deallocator(addr); }
|
||||||
|
void operator delete(void* addr, size_t) { BAN::deallocator(addr); }
|
||||||
|
void operator delete[](void* addr, size_t) { BAN::deallocator(addr); }
|
|
@ -1,5 +1,6 @@
|
||||||
#include <BAN/Errors.h>
|
#include <BAN/Errors.h>
|
||||||
#include <BAN/Math.h>
|
#include <BAN/Math.h>
|
||||||
|
#include <BAN/Memory.h>
|
||||||
#include <BAN/Move.h>
|
#include <BAN/Move.h>
|
||||||
#include <BAN/String.h>
|
#include <BAN/String.h>
|
||||||
#include <BAN/StringView.h>
|
#include <BAN/StringView.h>
|
||||||
|
|
|
@ -31,6 +31,7 @@ BUILDDIR=$(abspath build)
|
||||||
|
|
||||||
FREEOBJS= \
|
FREEOBJS= \
|
||||||
$(ARCH_FREEOBJS) \
|
$(ARCH_FREEOBJS) \
|
||||||
|
BAN/Memory.o \
|
||||||
BAN/String.o \
|
BAN/String.o \
|
||||||
BAN/StringView.o \
|
BAN/StringView.o \
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <BAN/Formatter.h>
|
#include <BAN/Formatter.h>
|
||||||
#include <BAN/Memory.h>
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -15,6 +14,8 @@
|
||||||
|
|
||||||
#define TRY(error) ({ auto e = error; if (e.IsError()) return e; e.Value(); })
|
#define TRY(error) ({ auto e = error; if (e.IsError()) return e; e.Value(); })
|
||||||
|
|
||||||
|
namespace BAN
|
||||||
|
{
|
||||||
|
|
||||||
class Error
|
class Error
|
||||||
{
|
{
|
||||||
|
@ -71,6 +72,7 @@ private:
|
||||||
bool m_has_error = false;
|
bool m_has_error = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
namespace BAN::Formatter
|
namespace BAN::Formatter
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
template<typename T> class ErrorOr;
|
#include <stddef.h>
|
||||||
|
|
||||||
namespace BAN
|
namespace BAN
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
template<typename, size_t> class Array;
|
||||||
|
template<typename> class ErrorOr;
|
||||||
|
template<typename> class Function;
|
||||||
|
template<typename> class Queue;
|
||||||
class String;
|
class String;
|
||||||
class StringView;
|
class StringView;
|
||||||
|
template<typename> class Vector;
|
||||||
template<typename T> class Vector;
|
|
||||||
template<typename T> class Queue;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,16 +38,5 @@ namespace BAN
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace std { enum class align_val_t : size_t {}; }
|
|
||||||
|
|
||||||
inline void* operator new(size_t size) { return BAN::allocator(size); }
|
|
||||||
inline void* operator new[](size_t size) { return BAN::allocator(size); }
|
|
||||||
inline void* operator new(size_t size, std::align_val_t align) { return BAN::allocator_align(size, (size_t)align); }
|
|
||||||
inline void* operator new[](size_t size, std::align_val_t align) { return BAN::allocator_align(size, (size_t)align); }
|
|
||||||
inline void* operator new(size_t, void* addr) { return addr; }
|
inline void* operator new(size_t, void* addr) { return addr; }
|
||||||
inline void* operator new[](size_t, void* addr) { return addr; }
|
inline void* operator new[](size_t, void* addr) { return addr; }
|
||||||
|
|
||||||
inline void operator delete(void* addr) { BAN::deallocator(addr); }
|
|
||||||
inline void operator delete[](void* addr) { BAN::deallocator(addr); }
|
|
||||||
inline void operator delete(void* addr, size_t) { BAN::deallocator(addr); }
|
|
||||||
inline void operator delete[](void* addr, size_t) { BAN::deallocator(addr); }
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <BAN/Errors.h>
|
#include <BAN/Errors.h>
|
||||||
#include <BAN/Math.h>
|
#include <BAN/Math.h>
|
||||||
|
#include <BAN/Memory.h>
|
||||||
#include <BAN/Move.h>
|
#include <BAN/Move.h>
|
||||||
|
|
||||||
namespace BAN
|
namespace BAN
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <BAN/Errors.h>
|
|
||||||
#include <BAN/ForwardList.h>
|
#include <BAN/ForwardList.h>
|
||||||
#include <BAN/Formatter.h>
|
#include <BAN/Formatter.h>
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <BAN/Errors.h>
|
#include <BAN/Errors.h>
|
||||||
#include <BAN/Math.h>
|
#include <BAN/Math.h>
|
||||||
|
#include <BAN/Memory.h>
|
||||||
#include <BAN/Move.h>
|
#include <BAN/Move.h>
|
||||||
|
|
||||||
namespace BAN
|
namespace BAN
|
||||||
|
|
Loading…
Reference in New Issue