summaryrefslogtreecommitdiff
path: root/libartbase/base/allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'libartbase/base/allocator.h')
-rw-r--r--libartbase/base/allocator.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libartbase/base/allocator.h b/libartbase/base/allocator.h
index 81f3a60815..24374a2b40 100644
--- a/libartbase/base/allocator.h
+++ b/libartbase/base/allocator.h
@@ -115,8 +115,8 @@ class TrackingAllocatorImpl : public std::allocator<T> {
// Used internally by STL data structures.
template <class U>
- TrackingAllocatorImpl(
- const TrackingAllocatorImpl<U, kTag>& alloc ATTRIBUTE_UNUSED) noexcept {}
+ explicit TrackingAllocatorImpl(
+ [[maybe_unused]] const TrackingAllocatorImpl<U, kTag>& alloc) noexcept {}
// Used internally by STL data structures.
TrackingAllocatorImpl() noexcept {
@@ -130,7 +130,7 @@ class TrackingAllocatorImpl : public std::allocator<T> {
using other = TrackingAllocatorImpl<U, kTag>;
};
- pointer allocate(size_type n, const_pointer hint ATTRIBUTE_UNUSED = 0) {
+ pointer allocate(size_type n, [[maybe_unused]] const_pointer hint = 0) {
const size_t size = n * sizeof(T);
TrackedAllocators::RegisterAllocation(GetTag(), size);
return reinterpret_cast<pointer>(malloc(size));