summaryrefslogtreecommitdiff
path: root/src/binding-hash.cc
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2017-02-27 18:09:36 -0800
committerGitHub <noreply@github.com>2017-02-27 18:09:36 -0800
commitf94275a6cf1f9ef990ec47d97a1174765790d56c (patch)
tree75d3b317855052872901e699af42f307d9c8ae58 /src/binding-hash.cc
parent86ee5244e68cc2320f1e8bde02aefe255d334430 (diff)
downloadwabt-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.cc4
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;