summaryrefslogtreecommitdiff
path: root/zen/crc.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-06-30 12:43:08 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2018-06-30 12:43:08 +0200
commita98326eb2954ac1e79f5eac28dbeab3ec15e047f (patch)
treebb16257a1894b488e365851273735ec13a9442ef /zen/crc.h
parent10.0 (diff)
downloadFreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.tar.gz
FreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.tar.bz2
FreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.zip
10.1
Diffstat (limited to 'zen/crc.h')
-rwxr-xr-xzen/crc.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/zen/crc.h b/zen/crc.h
index 6f6ca996..ebac538f 100755
--- a/zen/crc.h
+++ b/zen/crc.h
@@ -7,6 +7,7 @@
#ifndef CRC_H_23489275827847235
#define CRC_H_23489275827847235
+//boost, clean this mess up!
#include <boost/crc.hpp>
@@ -28,12 +29,12 @@ inline uint32_t getCrc32(const std::string& str) { return getCrc32(str.begin(),
template <class ByteIterator> inline
uint16_t getCrc16(ByteIterator first, ByteIterator last)
{
- static_assert(sizeof(typename std::iterator_traits<ByteIterator>::value_type) == 1, "");
+ static_assert(sizeof(typename std::iterator_traits<ByteIterator>::value_type) == 1);
boost::crc_16_type result;
if (first != last)
result.process_bytes(&*first, last - first);
auto rv = result.checksum();
- static_assert(sizeof(rv) == sizeof(uint16_t), "");
+ static_assert(sizeof(rv) == sizeof(uint16_t));
return rv;
}
@@ -41,12 +42,12 @@ uint16_t getCrc16(ByteIterator first, ByteIterator last)
template <class ByteIterator> inline
uint32_t getCrc32(ByteIterator first, ByteIterator last)
{
- static_assert(sizeof(typename std::iterator_traits<ByteIterator>::value_type) == 1, "");
+ static_assert(sizeof(typename std::iterator_traits<ByteIterator>::value_type) == 1);
boost::crc_32_type result;
if (first != last)
result.process_bytes(&*first, last - first);
auto rv = result.checksum();
- static_assert(sizeof(rv) == sizeof(uint32_t), "");
+ static_assert(sizeof(rv) == sizeof(uint32_t));
return rv;
}
}
bgstack15