[ox/std] Fix macOS build
This commit is contained in:
parent
f86d0e697a
commit
c178a2273b
2
deps/ox/src/ox/std/heapmgr.cpp
vendored
2
deps/ox/src/ox/std/heapmgr.cpp
vendored
@ -35,7 +35,7 @@ T *HeapSegment::data() {
|
|||||||
return ox::bit_cast<T*>(ox::bit_cast<uint8_t*>(this) + alignedSize(this));
|
return ox::bit_cast<T*>(ox::bit_cast<uint8_t*>(this) + alignedSize(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T = uint8_t>
|
template<typename T>
|
||||||
T *HeapSegment::end() {
|
T *HeapSegment::end() {
|
||||||
const auto size = alignedSize(this) + alignedSize(this->size);
|
const auto size = alignedSize(this) + alignedSize(this->size);
|
||||||
auto e = ox::bit_cast<uintptr_t>(ox::bit_cast<uint8_t*>(this) + size);
|
auto e = ox::bit_cast<uintptr_t>(ox::bit_cast<uint8_t*>(this) + size);
|
||||||
|
8
deps/ox/src/ox/std/test/tests.cpp
vendored
8
deps/ox/src/ox/std/test/tests.cpp
vendored
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2015 - 2018 gtalent2@gmail.com
|
* Copyright 2015 - 2020 gtalent2@gmail.com
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@ -11,13 +11,11 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <ox/std/std.hpp>
|
#include <ox/std/std.hpp>
|
||||||
|
|
||||||
using namespace std;
|
std::map<std::string, std::function<int()>> tests = {
|
||||||
|
|
||||||
map<string, function<int()>> tests = {
|
|
||||||
{
|
{
|
||||||
"malloc",
|
"malloc",
|
||||||
[] {
|
[] {
|
||||||
std::vector<char> buff(ox::units::MB);
|
ox::Vector<char> buff(ox::units::MB);
|
||||||
ox::heapmgr::initHeap(&buff.front(), &buff.back());
|
ox::heapmgr::initHeap(&buff.front(), &buff.back());
|
||||||
oxAssert(ox::heapmgr::malloc(5) != nullptr, "malloc is broken");
|
oxAssert(ox::heapmgr::malloc(5) != nullptr, "malloc is broken");
|
||||||
oxAssert(ox::heapmgr::malloc(5) != nullptr, "malloc is broken");
|
oxAssert(ox::heapmgr::malloc(5) != nullptr, "malloc is broken");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user