diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-05 16:04:30 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-05 16:04:30 +0900 |
| commit | 106f4c4e9d703f709ff3053848afb849c83b8ea4 (patch) | |
| tree | b93ed4a4076aa9b90daa41de4feeb9eeec8c2ffa /src/hash.c | |
| parent | f1523d24042ca3416dc5b9be7b3fc220ddaed896 (diff) | |
| download | mruby-106f4c4e9d703f709ff3053848afb849c83b8ea4.tar.gz mruby-106f4c4e9d703f709ff3053848afb849c83b8ea4.zip | |
Add proper casts to silence VC warnings.
Diffstat (limited to 'src/hash.c')
| -rw-r--r-- | src/hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hash.c b/src/hash.c index ec79a3def..575d35d12 100644 --- a/src/hash.c +++ b/src/hash.c @@ -365,7 +365,7 @@ ht_put(mrb_state *mrb, htable *t, mrb_value key, mrb_value val) if (!seg->next && i >= t->last_len) { seg->e[i].key = key; seg->e[i].val = val; - t->last_len = i+1; + t->last_len = (uint16_t)i+1; t->size++; return; } @@ -407,7 +407,7 @@ ht_put(mrb_state *mrb, htable *t, mrb_value key, mrb_value val) } seg->e[i].key = key; seg->e[i].val = val; - t->last_len = i+1; + t->last_len = (uint16_t)i+1; if (t->index == NULL && t->size > MRB_HT_INIT_SIZE*4) { ht_index(mrb, t); } |
