Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: test/cctest/compiler/test-operator.cc

Issue 2173403002: Replace SmartArrayPointer<T> with unique_ptr<T[]> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: even less redness Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/compiler/test-operator.cc
diff --git a/test/cctest/compiler/test-operator.cc b/test/cctest/compiler/test-operator.cc
index eecf46a054159162754a37d7a86e3043e47f5dad..b0a3e18e1f94f1e632bbe92a9543ca50273f973d 100644
--- a/test/cctest/compiler/test-operator.cc
+++ b/test/cctest/compiler/test-operator.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <memory>
#include <sstream>
#include "src/compiler/operator.h"
@@ -67,11 +68,11 @@ TEST(TestOperator_Equals) {
CHECK(!op2b.Equals(&op1b));
}
-
-static v8::base::SmartArrayPointer<const char> OperatorToString(Operator* op) {
+static std::unique_ptr<const char[]> OperatorToString(Operator* op) {
std::ostringstream os;
os << *op;
- return v8::base::SmartArrayPointer<const char>(StrDup(os.str().c_str()));
+ return std::unique_ptr<const char[]>(
+ const_cast<const char*>(StrDup(os.str().c_str())));
Igor Sheludko 2016/07/25 08:56:44 Unnecessary const_cast and probably constness of a
jochen (gone - plz use gerrit) 2016/07/25 09:14:48 done
}
« src/wasm/wasm-result.h ('K') | « src/wasm/wasm-result.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698