LinearDiskCache: Use make_unique_for_overwrite.

This commit is contained in:
Jordan Woyak 2025-04-18 22:59:56 -05:00
parent 1ae0b23265
commit f78fa2e9f1
1 changed files with 1 additions and 2 deletions

View File

@ -85,8 +85,7 @@ public:
if (next_extent > file_size)
break;
// TODO: use make_unique_for_overwrite in C++20
value = std::unique_ptr<V[]>(new V[value_size]);
value = std::make_unique_for_overwrite<V[]>(value_size);
// read key/value and pass to reader
if (m_file.ReadArray(&key, 1) && m_file.ReadArray(value.get(), value_size) &&