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

Unified Diff: third_party/WebKit/Source/platform/text/LocaleICU.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 years, 1 month 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: third_party/WebKit/Source/platform/text/LocaleICU.cpp
diff --git a/third_party/WebKit/Source/platform/text/LocaleICU.cpp b/third_party/WebKit/Source/platform/text/LocaleICU.cpp
index b846837e47fa1fd9809044317210f2e3c8672af6..c93236342050214427c08f95d189c2d5027a2049 100644
--- a/third_party/WebKit/Source/platform/text/LocaleICU.cpp
+++ b/third_party/WebKit/Source/platform/text/LocaleICU.cpp
@@ -190,7 +190,7 @@ std::unique_ptr<Vector<String>> LocaleICU::createLabelVector(
if (udat_countSymbols(dateFormat, type) != startIndex + size)
return std::unique_ptr<Vector<String>>();
- std::unique_ptr<Vector<String>> labels = wrapUnique(new Vector<String>());
+ std::unique_ptr<Vector<String>> labels = makeUnique<Vector<String>>();
labels->reserveCapacity(size);
bool isStandAloneMonth = (type == UDAT_STANDALONE_MONTHS) ||
(type == UDAT_STANDALONE_SHORT_MONTHS);
@@ -223,7 +223,7 @@ std::unique_ptr<Vector<String>> LocaleICU::createLabelVector(
}
static std::unique_ptr<Vector<String>> createFallbackWeekDayShortLabels() {
- std::unique_ptr<Vector<String>> labels = wrapUnique(new Vector<String>());
+ std::unique_ptr<Vector<String>> labels = makeUnique<Vector<String>>();
labels->reserveCapacity(7);
labels->append("Sun");
labels->append("Mon");
@@ -255,7 +255,7 @@ void LocaleICU::initializeCalendar() {
}
static std::unique_ptr<Vector<String>> createFallbackMonthLabels() {
- std::unique_ptr<Vector<String>> labels = wrapUnique(new Vector<String>());
+ std::unique_ptr<Vector<String>> labels = makeUnique<Vector<String>>();
labels->reserveCapacity(WTF_ARRAY_LENGTH(WTF::monthFullName));
for (unsigned i = 0; i < WTF_ARRAY_LENGTH(WTF::monthFullName); ++i)
labels->append(WTF::monthFullName[i]);
@@ -292,7 +292,7 @@ bool LocaleICU::isRTL() {
}
static std::unique_ptr<Vector<String>> createFallbackAMPMLabels() {
- std::unique_ptr<Vector<String>> labels = wrapUnique(new Vector<String>());
+ std::unique_ptr<Vector<String>> labels = makeUnique<Vector<String>>();
labels->reserveCapacity(2);
labels->append("AM");
labels->append("PM");

Powered by Google App Engine
This is Rietveld 408576698