summaryrefslogtreecommitdiff
path: root/runtime/monitor_test.cc
diff options
context:
space:
mode:
author Yi Kong <yikong@google.com> 2018-10-29 14:28:56 -0700
committer Yi Kong <yikong@google.com> 2018-10-29 14:39:24 -0700
commitc57c680b16eb4857eef16134a811f4c2ff9d95f0 (patch)
tree9527328cb8738878e1b727a48620769224dddb2c /runtime/monitor_test.cc
parentce2a00daa92670a4fc01ef59fdbc3769a846f69c (diff)
Modernise code to use std::make_unique
Generated by clang-tidy. Test: m checkbuild Change-Id: Idb24960d9326c0d94ab5d04b18deb0894d23da9f
Diffstat (limited to 'runtime/monitor_test.cc')
-rw-r--r--runtime/monitor_test.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/monitor_test.cc b/runtime/monitor_test.cc
index 8610899b9b..8ddd50f031 100644
--- a/runtime/monitor_test.cc
+++ b/runtime/monitor_test.cc
@@ -16,6 +16,7 @@
#include "monitor.h"
+#include <memory>
#include <string>
#include "base/atomic.h"
@@ -251,8 +252,8 @@ static void CommonWaitSetup(MonitorTest* test, ClassLinker* class_linker, uint64
"hello, world!"));
// Create the barrier used to synchronize.
- test->barrier_ = std::unique_ptr<Barrier>(new Barrier(2));
- test->complete_barrier_ = std::unique_ptr<Barrier>(new Barrier(3));
+ test->barrier_ = std::make_unique<Barrier>(2);
+ test->complete_barrier_ = std::make_unique<Barrier>(3);
test->completed_ = false;
// Our job: Fill the heap, then try Wait.