[ox/std] Remove ox_freea
This commit is contained in:
parent
ecbeabff48
commit
3a70c0972b
1
deps/ox/src/ox/fs/filesystem2/directory.hpp
vendored
1
deps/ox/src/ox/fs/filesystem2/directory.hpp
vendored
@ -142,7 +142,6 @@ Error Directory<InodeId_t>::write(PathIterator path, InodeId_t inode) noexcept {
|
|||||||
new (val) DirectoryEntry<InodeId_t>(inode, name.data());
|
new (val) DirectoryEntry<InodeId_t>(inode, name.data());
|
||||||
err = m_fs->write(m_inodeId, cpy, cpy->size());
|
err = m_fs->write(m_inodeId, cpy, cpy->size());
|
||||||
}
|
}
|
||||||
ox_freea(newSize, cpy);
|
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
1
deps/ox/src/ox/std/CMakeLists.txt
vendored
1
deps/ox/src/ox/std/CMakeLists.txt
vendored
@ -5,7 +5,6 @@ add_library(
|
|||||||
assert.cpp
|
assert.cpp
|
||||||
byteswap.cpp
|
byteswap.cpp
|
||||||
memops.cpp
|
memops.cpp
|
||||||
new.cpp
|
|
||||||
random.cpp
|
random.cpp
|
||||||
strops.cpp
|
strops.cpp
|
||||||
)
|
)
|
||||||
|
15
deps/ox/src/ox/std/new.cpp
vendored
15
deps/ox/src/ox/std/new.cpp
vendored
@ -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>;
|
|
||||||
|
|
||||||
}
|
|
11
deps/ox/src/ox/std/new.hpp
vendored
11
deps/ox/src/ox/std/new.hpp
vendored
@ -39,15 +39,6 @@ constexpr auto MallocaStackLimit = 1024;
|
|||||||
#define ox_malloca(size, Type, ...) ox::MallocaPtr<Type>(size, ox_alloca(size))
|
#define ox_malloca(size, Type, ...) ox::MallocaPtr<Type>(size, ox_alloca(size))
|
||||||
#endif
|
#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 {
|
namespace ox {
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
@ -113,6 +104,4 @@ class MallocaPtr {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern template class MallocaPtr<int>;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user