summaryrefslogtreecommitdiff
path: root/Build/source/libs/graphite/engine-2.4-PATCHES/patch-07-stdlib-workaround
blob: 8aadf2edc628395379fb5a9191247d2828e18013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff -ur engine-2.4.orig/src/font/TtfUtil.cpp engine-2.4/src/font/TtfUtil.cpp
--- engine-2.4.orig/src/font/TtfUtil.cpp	2012-03-16 23:55:47.000000000 +0100
+++ engine-2.4/src/font/TtfUtil.cpp	2012-03-17 00:52:28.000000000 +0100
@@ -806,12 +806,14 @@
 	uint16 * pStr = reinterpret_cast<uint16 *>(pWStr);
 	uint16 * const pStrEnd = pStr + (nSize == 0 ? gr::utf16len(pStr) : nSize);
 
+#ifndef USE_STDLIB_WORKAROUNDS
 	std::transform(pStr, pStrEnd, pStr, read<uint16>);
-
-//		for (int i = 0; i < nSize; i++)
-//		{ // swap the wide characters in the string
-//			pStr[i] = gr::utf16(read(uint16(pStr[i])));
-//		}
+#else
+		for (int i = 0; i < nSize; i++)
+		{ // swap the wide characters in the string
+			pStr[i] = gr::utf16(read(uint16(pStr[i])));
+		}
+#endif
 }
 
 /*----------------------------------------------------------------------------------------------