Index: src/utils.h |
=================================================================== |
--- src/utils.h (revision 549) |
+++ src/utils.h (working copy) |
@@ -448,7 +448,11 @@ |
template <typename sourcechar, typename sinkchar> |
static inline void CopyChars(sinkchar* dest, const sourcechar* src, int chars) { |
while (chars--) { |
- *dest++ = *src++; |
+ // We have to have a cast here, otherwise MSVC complains about a possible |
+ // loss of data when sourcechar is 16 bit and sinkchar is 8 bit. But we |
+ // can't have a reinterpret cast because gcc doesn't like a reinterpret_cast |
+ // that doesn't change the type. |
+ *dest++ = (sinkchar)(*src++); |
} |
} |