mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
clang-tidy: modernize-make-unique
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user