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

Unified Diff: compiled/String.h

Issue 29716557: Issue 6220 - add appveyor configuration for adblockpluscore [emscripten] (Closed) Base URL: github.com:adblockplus/adblockpluscore
Patch Set: Created March 7, 2018, 10:32 a.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
« no previous file with comments | « appveyor.yml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/String.h
diff --git a/compiled/String.h b/compiled/String.h
index 85f3e244604a064423f488ca9bfb2e1d2120043f..489200b7de558aac332187c5f1f18adc39126932 100644
--- a/compiled/String.h
+++ b/compiled/String.h
@@ -210,8 +210,14 @@ public:
#ifdef INSIDE_TESTS
inline std::ostream& operator<<(std::ostream& os, const String& str)
{
+#if _MSC_VER >= 1900
+ std::wstring_convert<std::codecvt_utf8_utf16<int16_t>, int16_t> converter;
+ auto p = reinterpret_cast<const int16_t *>(str.data());
+ os << converter.to_bytes(p, p + str.length());
+#else
std::wstring_convert<std::codecvt_utf8<char16_t>, char16_t> converter;
os << converter.to_bytes(str.data(), str.data() + str.length());
+#endif
return os;
}
#endif
« no previous file with comments | « appveyor.yml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld