[ox] Cleanup
This commit is contained in:
parent
576a05a038
commit
a8e1197ad0
4
deps/ox/src/ox/fs/filesystem2/directory.hpp
vendored
4
deps/ox/src/ox/fs/filesystem2/directory.hpp
vendored
@ -159,12 +159,12 @@ template<typename InodeId_t>
|
|||||||
ValErr<InodeId_t> Directory<InodeId_t>::find(PathIterator it) const noexcept {
|
ValErr<InodeId_t> Directory<InodeId_t>::find(PathIterator it) const noexcept {
|
||||||
ValErr<InodeId_t> retval = {0, 1};
|
ValErr<InodeId_t> retval = {0, 1};
|
||||||
auto size = it.nextSize();
|
auto size = it.nextSize();
|
||||||
auto name = reinterpret_cast<char*>(ox_alloca(size + 1));
|
auto name = ox_malloca(size + 1, char);
|
||||||
it.next(name, size);
|
it.next(name, size);
|
||||||
auto buff = m_fs->read(m_inodeId).template to<Buffer>();
|
auto buff = m_fs->read(m_inodeId).template to<Buffer>();
|
||||||
for (auto i = buff->iterator(); i.hasNext(); i.next()) {
|
for (auto i = buff->iterator(); i.hasNext(); i.next()) {
|
||||||
auto data = i->data();
|
auto data = i->data();
|
||||||
if (data.valid() && data->name == name) {
|
if (data.valid() && data->name == name.get()) {
|
||||||
retval = static_cast<InodeId_t>(data->inode);
|
retval = static_cast<InodeId_t>(data->inode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
8
deps/ox/src/ox/std/new.hpp
vendored
8
deps/ox/src/ox/std/new.hpp
vendored
@ -27,12 +27,6 @@
|
|||||||
void *operator new(std::size_t, void*) noexcept;
|
void *operator new(std::size_t, void*) noexcept;
|
||||||
|
|
||||||
|
|
||||||
namespace ox {
|
|
||||||
|
|
||||||
constexpr auto MallocaStackLimit = 1024;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return an ox::MallocaPtr of the given type pointing to the requested size memory allocation
|
* @return an ox::MallocaPtr of the given type pointing to the requested size memory allocation
|
||||||
*/
|
*/
|
||||||
@ -44,6 +38,8 @@ constexpr auto MallocaStackLimit = 1024;
|
|||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
|
constexpr auto MallocaStackLimit = 1024;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MallocaPtr will automatically cleanup the pointed to address upon
|
* MallocaPtr will automatically cleanup the pointed to address upon
|
||||||
* destruction if the size of the allocation is greater than MallocaStackLimit.
|
* destruction if the size of the allocation is greater than MallocaStackLimit.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user