mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-18 09:04:49 -04:00
Cleanup
This commit is contained in:
parent
e25d594496
commit
ee5b60e07b
@ -25,19 +25,6 @@ struct default_delete {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
struct malloc_delete {
|
|
||||||
malloc_delete() {}
|
|
||||||
|
|
||||||
template<typename Up>
|
|
||||||
malloc_delete(const malloc_delete<Up>&) {}
|
|
||||||
|
|
||||||
void operator()(T* ptr) const {
|
|
||||||
static_assert(sizeof(T) > 0, "Type must be complete");
|
|
||||||
k_free(ptr);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T, typename D = default_delete<T>>
|
template <typename T, typename D = default_delete<T>>
|
||||||
class unique_ptr {
|
class unique_ptr {
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user