From 7596282a556accb84fbcec3f31a3e2017d8ade0c Mon Sep 17 00:00:00 2001 From: laanwj <126646+laanwj@users.noreply.github.com> Date: Sun, 27 Oct 2024 09:03:47 +0100 Subject: [PATCH] memusage: Allow counting usage of vectors with different allocators --- src/memusage.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/memusage.h b/src/memusage.h index 08be66172e3..43407507ed8 100644 --- a/src/memusage.h +++ b/src/memusage.h @@ -84,10 +84,10 @@ struct stl_shared_counter size_t weak_count; }; -template -static inline size_t DynamicUsage(const std::vector& v) +template +static inline size_t DynamicUsage(const std::vector& v) { - return MallocUsage(v.capacity() * sizeof(X)); + return MallocUsage(v.capacity() * sizeof(T)); } template