CR
This commit is contained in:
committed by
Matthew Parkinson
parent
8eb6e36966
commit
c471e1a271
@@ -454,9 +454,9 @@ namespace snmalloc
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of std::min
|
||||
* Implementation of `std::min`
|
||||
*
|
||||
* std::min is algorithm, so pulls in a lot of unneccessary code
|
||||
* `std::min` is in `<algorithm>`, so pulls in a lot of unneccessary code
|
||||
* We write our own to reduce the code that potentially needs reviewing.
|
||||
**/
|
||||
template<typename T>
|
||||
@@ -466,9 +466,9 @@ namespace snmalloc
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of std::max
|
||||
* Implementation of `std::max`
|
||||
*
|
||||
* std::max is algorithm, so pulls in a lot of unneccessary code
|
||||
* `std::max` is in `<algorithm>`, so pulls in a lot of unneccessary code
|
||||
* We write our own to reduce the code that potentially needs reviewing.
|
||||
**/
|
||||
template<typename T>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
namespace snmalloc
|
||||
{
|
||||
template<class T, uintptr_t terminator_ = 0>
|
||||
template<class T, uintptr_t Terminator = 0>
|
||||
class DLList
|
||||
{
|
||||
private:
|
||||
@@ -15,7 +15,7 @@ namespace snmalloc
|
||||
// constexpr.
|
||||
static inline T* terminator()
|
||||
{
|
||||
return (T*)terminator_;
|
||||
return (T*)Terminator;
|
||||
}
|
||||
|
||||
static_assert(
|
||||
@@ -26,6 +26,11 @@ namespace snmalloc
|
||||
T* head = terminator();
|
||||
|
||||
public:
|
||||
bool is_empty()
|
||||
{
|
||||
return head == terminator();
|
||||
}
|
||||
|
||||
T* get_head()
|
||||
{
|
||||
return head;
|
||||
|
||||
Reference in New Issue
Block a user