diff --git a/common/almalloc.h b/common/almalloc.h index 37b57d2b..d144ca35 100644 --- a/common/almalloc.h +++ b/common/almalloc.h @@ -42,7 +42,7 @@ struct FamCount { size_t mCount; }; return ret; \ throw std::bad_alloc(); \ } \ - void operator delete(void *block, FamCount /*fam*/) { al_free(block); } \ + void operator delete(void *block, FamCount) { al_free(block); } \ void operator delete(void *block) noexcept { al_free(block); } @@ -61,12 +61,12 @@ struct allocator { }; allocator() = default; - template - constexpr allocator(const allocator&) noexcept { } + template + constexpr allocator(const allocator&) noexcept { } - [[nodiscard]] T *allocate(std::size_t n) + T *allocate(std::size_t n) { - if(n > std::numeric_limits::max() / sizeof(T)) throw std::bad_alloc(); + if(n > std::numeric_limits::max()/sizeof(T)) throw std::bad_alloc(); if(auto p = static_cast(al_malloc(alignment, n*sizeof(T)))) return p; throw std::bad_alloc(); }