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

Unified Diff: Source/core/platform/text/win/LocaleWin.cpp

Issue 21262003: Remove String::adopt(Vector<UChar>) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 7 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
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/wtf/text/StringBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/text/win/LocaleWin.cpp
diff --git a/Source/core/platform/text/win/LocaleWin.cpp b/Source/core/platform/text/win/LocaleWin.cpp
index 2d565deb261ea8e4234b81a0be55e477cf07b184..cc757a4daf1d85afb98996788a3df04e2e03f877 100644
--- a/Source/core/platform/text/win/LocaleWin.cpp
+++ b/Source/core/platform/text/win/LocaleWin.cpp
@@ -42,6 +42,7 @@
#include "wtf/HashMap.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
+#include "wtf/text/StringBuffer.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/StringHash.h"
@@ -179,8 +180,8 @@ String LocaleWin::getLocaleInfoString(LCTYPE type)
int bufferSizeWithNUL = ::GetLocaleInfo(m_lcid, type, 0, 0);
if (bufferSizeWithNUL <= 0)
return String();
- Vector<UChar> buffer(bufferSizeWithNUL);
- ::GetLocaleInfo(m_lcid, type, buffer.data(), bufferSizeWithNUL);
+ StringBuffer<UChar> buffer(bufferSizeWithNUL);
+ ::GetLocaleInfo(m_lcid, type, buffer.characters(), bufferSizeWithNUL);
buffer.shrink(bufferSizeWithNUL - 1);
return String::adopt(buffer);
}
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/wtf/text/StringBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698