From d30a978370e77dd8cf78bb911d73a9bc6aaf9301 Mon Sep 17 00:00:00 2001 From: nordlow Date: Thu, 19 Aug 2021 12:18:29 +0200 Subject: [PATCH] Qualify Mallocator members as const --- std/experimental/allocator/mallocator.d | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/std/experimental/allocator/mallocator.d b/std/experimental/allocator/mallocator.d index bd813a51f..895d5883f 100644 --- a/std/experimental/allocator/mallocator.d +++ b/std/experimental/allocator/mallocator.d @@ -28,7 +28,7 @@ struct Mallocator programs that can afford to leak memory allocated. */ @trusted @nogc nothrow pure - void[] allocate(size_t bytes) shared + void[] allocate(size_t bytes) shared const { import core.memory : pureMalloc; if (!bytes) return null; @@ -38,7 +38,7 @@ struct Mallocator /// Ditto @system @nogc nothrow pure - bool deallocate(void[] b) shared + bool deallocate(void[] b) shared const { import core.memory : pureFree; pureFree(b.ptr); @@ -47,7 +47,7 @@ struct Mallocator /// Ditto @system @nogc nothrow pure - bool reallocate(ref void[] b, size_t s) shared + bool reallocate(ref void[] b, size_t s) shared const { import core.memory : pureRealloc; if (!s) @@ -65,7 +65,7 @@ struct Mallocator } @trusted @nogc nothrow pure - package void[] allocateZeroed()(size_t bytes) shared + package void[] allocateZeroed()(size_t bytes) shared const { import core.memory : pureCalloc; if (!bytes) return null;