Fixed numerous issues that caused errors in clang
[supertux.git] / src / util / utf8_iterator.cpp
index 01234d2..fa3b198 100644 (file)
@@ -94,7 +94,7 @@ UTF8Iterator::UTF8Iterator(const std::string& text_) :
   try {
     chr = decode_utf8(text, pos);
   } catch (std::exception) {
-    log_debug << "Malformed utf-8 sequence beginning with " << *((const uint32_t*)(text.c_str() + pos)) << " found " << std::endl;
+    log_debug << "Malformed utf-8 sequence beginning with " << *(reinterpret_cast<const uint32_t*>(text.c_str() + pos)) << " found " << std::endl;
     chr = 0;
   }
 }
@@ -110,7 +110,7 @@ UTF8Iterator::operator++() {
     try {
       chr = decode_utf8(text, pos);
     } catch (std::exception) {
-      log_debug << "Malformed utf-8 sequence beginning with " << *((const uint32_t*)(text.c_str() + pos)) << " found " << std::endl;
+      log_debug << "Malformed utf-8 sequence beginning with " << *(reinterpret_cast<const uint32_t*>(text.c_str() + pos)) << " found " << std::endl;
       chr = 0;
       ++pos;
     }