clang-tidy: modernize-make-unique

This commit is contained in:
Peter Johnson
2020-12-28 09:43:14 -08:00
parent 6131f4e32b
commit 29c7da5f1a
3 changed files with 9 additions and 5 deletions

View File

@@ -6,6 +6,7 @@
#include <algorithm>
#include <cstring>
#include <memory>
#include <wpi/json.h>
#include <wpi/timestamp.h>
@@ -423,7 +424,7 @@ std::unique_ptr<Image> SourceImpl::AllocImage(
// if nothing found, allocate a new buffer
if (found < 0) {
image.reset(new Image{size});
image = std::make_unique<Image>(size);
} else {
image = std::move(m_imagesAvail[found]);
}