diff options
author | Ben Smith <binjimin@gmail.com> | 2017-02-27 18:09:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 18:09:36 -0800 |
commit | f94275a6cf1f9ef990ec47d97a1174765790d56c (patch) | |
tree | 75d3b317855052872901e699af42f307d9c8ae58 /src/binding-hash.cc | |
parent | 86ee5244e68cc2320f1e8bde02aefe255d334430 (diff) | |
download | wabt-f94275a6cf1f9ef990ec47d97a1174765790d56c.tar.gz wabt-f94275a6cf1f9ef990ec47d97a1174765790d56c.tar.bz2 wabt-f94275a6cf1f9ef990ec47d97a1174765790d56c.zip |
Require C++-style casts, disallow C-style casts (#320)
Diffstat (limited to 'src/binding-hash.cc')
-rw-r--r-- | src/binding-hash.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binding-hash.cc b/src/binding-hash.cc index a7230e93..6e743ad4 100644 --- a/src/binding-hash.cc +++ b/src/binding-hash.cc @@ -21,11 +21,11 @@ static size_t hash_name(const WabtStringSlice* name) { // FNV-1a hash const uint32_t fnv_prime = 0x01000193; - const uint8_t* bp = (const uint8_t*)name->start; + const uint8_t* bp = reinterpret_cast<const uint8_t*>(name->start); const uint8_t* be = bp + name->length; uint32_t hval = 0x811c9dc5; while (bp < be) { - hval ^= (uint32_t)*bp++; + hval ^= static_cast<uint32_t>(*bp++); hval *= fnv_prime; } return hval; |