From c9ffffda54bbc3ea18f83a8bcf4e924cab10e7fd Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 8 Feb 2013 09:51:18 -0800 Subject: [PATCH] Fix compilation with clang --- aegisub/libaegisub/ass/uuencode.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aegisub/libaegisub/ass/uuencode.cpp b/aegisub/libaegisub/ass/uuencode.cpp index ffe7c89c9..8ddb2b334 100644 --- a/aegisub/libaegisub/ass/uuencode.cpp +++ b/aegisub/libaegisub/ass/uuencode.cpp @@ -57,10 +57,10 @@ std::string UUEncode(std::vector const& data) { memcpy(src, &data[pos], std::min(3u, data.size() - pos)); unsigned char dst[4] = { - src[0] >> 2, - ((src[0] & 0x3) << 4) | ((src[1] & 0xF0) >> 4), - ((src[1] & 0xF) << 2) | ((src[2] & 0xC0) >> 6), - src[2] & 0x3F + static_cast(src[0] >> 2), + static_cast(((src[0] & 0x3) << 4) | ((src[1] & 0xF0) >> 4)), + static_cast(((src[1] & 0xF) << 2) | ((src[2] & 0xC0) >> 6)), + static_cast(src[2] & 0x3F) }; for (size_t i = 0; i < std::min(data.size() - pos + 1, 4u); ++i) {