[ox/std] Remove ox_freea

This commit is contained in:
Gary Talent 2018-05-03 01:13:57 -05:00
parent ecbeabff48
commit 3a70c0972b
4 changed files with 0 additions and 28 deletions

View File

@ -142,7 +142,6 @@ Error Directory<InodeId_t>::write(PathIterator path, InodeId_t inode) noexcept {
new (val) DirectoryEntry<InodeId_t>(inode, name.data());
err = m_fs->write(m_inodeId, cpy, cpy->size());
}
ox_freea(newSize, cpy);
}
return err;
}

View File

@ -5,7 +5,6 @@ add_library(
assert.cpp
byteswap.cpp
memops.cpp
new.cpp
random.cpp
strops.cpp
)

View File

@ -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<int>;
}

View File

@ -39,15 +39,6 @@ constexpr auto MallocaStackLimit = 1024;
#define ox_malloca(size, Type, ...) ox::MallocaPtr<Type>(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<uint8_t*>(ptr);
}
}
}
namespace ox {
template<typename T>
@ -113,6 +104,4 @@ class MallocaPtr {
};
extern template class MallocaPtr<int>;
}