Skip to content

Commit dc9c6a9

Browse files
[Warnings] Fixed Ambiguous Unique Pointer Allocation
1 parent 47fbc84 commit dc9c6a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vpr/test/test_post_verilog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "timing_place_lookup.h"
55

66
#include <fstream>
7+
#include <memory>
78

89
namespace {
910

@@ -87,7 +88,7 @@ void copy_file(const std::string& src_fname, const std::string& dst_fname) {
8788
size_t size = src_file.tellg();
8889
src_file.seekg(0, std::ios_base::beg);
8990

90-
auto buf = std::unique_ptr<uint8_t>(new uint8_t[size]);
91+
auto buf = std::make_unique<uint8_t[]>(size);
9192
src_file.read((char*)buf.get(), size);
9293
dst_file.write((char*)buf.get(), size);
9394
}

0 commit comments

Comments
 (0)