diff --git a/deps/ox/src/ox/fs/filesystem2/directory.hpp b/deps/ox/src/ox/fs/filesystem2/directory.hpp index beb99dc7..50bd8790 100644 --- a/deps/ox/src/ox/fs/filesystem2/directory.hpp +++ b/deps/ox/src/ox/fs/filesystem2/directory.hpp @@ -142,7 +142,6 @@ Error Directory::write(PathIterator path, InodeId_t inode) noexcept { new (val) DirectoryEntry(inode, name.data()); err = m_fs->write(m_inodeId, cpy, cpy->size()); } - ox_freea(newSize, cpy); } return err; } diff --git a/deps/ox/src/ox/std/CMakeLists.txt b/deps/ox/src/ox/std/CMakeLists.txt index b19a6d76..c1d73b1c 100644 --- a/deps/ox/src/ox/std/CMakeLists.txt +++ b/deps/ox/src/ox/std/CMakeLists.txt @@ -5,7 +5,6 @@ add_library( assert.cpp byteswap.cpp memops.cpp - new.cpp random.cpp strops.cpp ) diff --git a/deps/ox/src/ox/std/new.cpp b/deps/ox/src/ox/std/new.cpp deleted file mode 100644 index f973522c..00000000 --- a/deps/ox/src/ox/std/new.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2015 - 2018 gtalent2@gmail.com - * - * 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 - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "new.hpp" - -namespace ox { - -template class MallocaPtr; - -} diff --git a/deps/ox/src/ox/std/new.hpp b/deps/ox/src/ox/std/new.hpp index d1c774ef..175c0a9d 100644 --- a/deps/ox/src/ox/std/new.hpp +++ b/deps/ox/src/ox/std/new.hpp @@ -39,15 +39,6 @@ constexpr auto MallocaStackLimit = 1024; #define ox_malloca(size, Type, ...) ox::MallocaPtr(size, ox_alloca(size)) #endif -inline constexpr void ox_freea(std::size_t size, void *ptr) { - if constexpr(ox::defines::UseStdLib) { - if (size > ox::MallocaStackLimit) { - delete[] reinterpret_cast(ptr); - } - } -} - - namespace ox { template @@ -113,6 +104,4 @@ class MallocaPtr { }; -extern template class MallocaPtr; - }