Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/shared/Utils.cpp

Issue 4806567450902528: Issue 1794 - add handling of std::vector<std::string> by Communication::{Input,Output}Buffer (Closed)
Patch Set: remove WriteStrings and ReadStrings Created Feb. 9, 2015, 2:04 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/shared/Utils.cpp
diff --git a/src/shared/Utils.cpp b/src/shared/Utils.cpp
index 6522bf42d61ed43755999caa4d953bd49dada4be..a41a5c883a8a370f821b43dfdef133e3fd2e5324 100644
--- a/src/shared/Utils.cpp
+++ b/src/shared/Utils.cpp
@@ -66,6 +66,14 @@ std::wstring ToUtf16String(const std::string& str)
return utf16String;
}
+std::vector<std::wstring> ToUtf16Strings(const std::vector<std::string>& values)
+{
+ std::vector<std::wstring> result;
+ result.reserve(values.size());
+ transform(values.begin(), values.end(), back_inserter(result), ToUtf16String);
+ return result;
+}
+
std::wstring GetDllDir()
{
std::vector<WCHAR> path(MAX_PATH);

Powered by Google App Engine
This is Rietveld