From f78fa2e9f18304bc0ae03c7c59cf217f599a9de4 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Fri, 18 Apr 2025 22:59:56 -0500 Subject: [PATCH] LinearDiskCache: Use make_unique_for_overwrite. --- Source/Core/Common/LinearDiskCache.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Core/Common/LinearDiskCache.h b/Source/Core/Common/LinearDiskCache.h index f0a4815143..061f7d4b19 100644 --- a/Source/Core/Common/LinearDiskCache.h +++ b/Source/Core/Common/LinearDiskCache.h @@ -85,8 +85,7 @@ public: if (next_extent > file_size) break; - // TODO: use make_unique_for_overwrite in C++20 - value = std::unique_ptr(new V[value_size]); + value = std::make_unique_for_overwrite(value_size); // read key/value and pass to reader if (m_file.ReadArray(&key, 1) && m_file.ReadArray(value.get(), value_size) &&