aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-06 03:36:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-06 03:36:52 +0000
commitf12bd41728cf23c33ebf34bf971b194ebf46715a (patch)
treeb7364708c92b6ba183562fb95e9369c05b67575a /hash.c
parent7b6aa34f366d4f1d534452ba155d2e25c2d1e97a (diff)
downloadruby-f12bd41728cf23c33ebf34bf971b194ebf46715a.tar.gz
remove unnecessary variable
* st.c (do_hash): remove unnecessary variable and cast. * hash.c, numeric.c, st.c: adjust style and indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/hash.c b/hash.c
index b4c74ed6d3..388446efad 100644
--- a/hash.c
+++ b/hash.c
@@ -217,22 +217,26 @@ obj_any_hash(VALUE obj)
}
static inline st_index_t
-any_hash_weak(VALUE a, st_index_t (*other_func)(VALUE)) {
+any_hash_weak(VALUE a, st_index_t (*other_func)(VALUE))
+{
return any_hash_general(a, FALSE, other_func);
}
static st_index_t
-rb_any_hash_weak(VALUE a) {
+rb_any_hash_weak(VALUE a)
+{
return any_hash_weak(a, obj_any_hash);
}
static inline st_index_t
-any_hash(VALUE a, st_index_t (*other_func)(VALUE)) {
+any_hash(VALUE a, st_index_t (*other_func)(VALUE))
+{
return any_hash_general(a, TRUE, other_func);
}
static st_index_t
-rb_any_hash(VALUE a) {
+rb_any_hash(VALUE a)
+{
return any_hash(a, obj_any_hash);
}
@@ -246,7 +250,7 @@ static const uint64_t prime2 = 0xcdb32970830fcaa1ULL;
static inline uint64_t
-mult_and_mix (uint64_t m1, uint64_t m2)
+mult_and_mix(uint64_t m1, uint64_t m2)
{
#if defined(__GNUC__) && UINT_MAX != ULONG_MAX
__uint128_t r = (__uint128_t) m1 * (__uint128_t) m2;
@@ -263,7 +267,7 @@ mult_and_mix (uint64_t m1, uint64_t m2)
}
static inline uint64_t
-key64_hash (uint64_t key, uint32_t seed)
+key64_hash(uint64_t key, uint32_t seed)
{
return mult_and_mix(key + seed, prime1);
}