diff --git a/algorithms/crc32_processor.hpp b/algorithms/crc32_processor.hpp index a68514dce..de5b8f67f 100644 --- a/algorithms/crc32_processor.hpp +++ b/algorithms/crc32_processor.hpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2015, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -49,7 +49,7 @@ class IteratorbasedCRC32 while (iter != end) { using value_type = typename std::iterator_traits::value_type; - char *data = (char *)(&(*iter)); + char *data = reinterpret_cast(&(*iter)); if (use_hardware_implementation) { @@ -96,7 +96,7 @@ class IteratorbasedCRC32 ++p; } - str = (char *)p; + str = reinterpret_cast(p); while (r--) { __asm__ __volatile__(".byte 0xf2, 0xf, 0x38, 0xf1, 0xf1;" @@ -131,8 +131,7 @@ class IteratorbasedCRC32 struct RangebasedCRC32 { - template - unsigned operator()(const Iteratable &iterable) + template unsigned operator()(const Iteratable &iterable) { return crc32(std::begin(iterable), std::end(iterable)); }