summaryrefslogtreecommitdiff
path: root/memtable
diff options
context:
space:
mode:
authorDmitri Smirnov <dmitrism@microsoft.com>2017-10-19 10:48:47 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2017-10-19 10:57:12 -0700
commitebab2e2d42bd13a85b355264603d63f9f988572f (patch)
tree3a7c2eb3814baea4a321e2e4f411e537b0ecbb6c /memtable
parentb74999458f1f2a974435f748c8c51628dd8134d8 (diff)
Enable MSVC W4 with a few exceptions. Fix warnings and bugs
Summary: Closes https://github.com/facebook/rocksdb/pull/3018 Differential Revision: D6079011 Pulled By: yiwu-arbug fbshipit-source-id: 988a721e7e7617967859dba71d660fc69f4dff57
Diffstat (limited to 'memtable')
-rw-r--r--memtable/inlineskiplist.h4
-rw-r--r--memtable/skiplist.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/memtable/inlineskiplist.h b/memtable/inlineskiplist.h
index 6262fc691..6ab79e668 100644
--- a/memtable/inlineskiplist.h
+++ b/memtable/inlineskiplist.h
@@ -565,8 +565,8 @@ InlineSkipList<Comparator>::InlineSkipList(const Comparator cmp,
Allocator* allocator,
int32_t max_height,
int32_t branching_factor)
- : kMaxHeight_(max_height),
- kBranching_(branching_factor),
+ : kMaxHeight_(static_cast<uint16_t>(max_height)),
+ kBranching_(static_cast<uint16_t>(branching_factor)),
kScaledInverseBranching_((Random::kMaxNext + 1) / kBranching_),
compare_(cmp),
allocator_(allocator),
diff --git a/memtable/skiplist.h b/memtable/skiplist.h
index 58996be3e..47a89034e 100644
--- a/memtable/skiplist.h
+++ b/memtable/skiplist.h
@@ -409,8 +409,8 @@ template <typename Key, class Comparator>
SkipList<Key, Comparator>::SkipList(const Comparator cmp, Allocator* allocator,
int32_t max_height,
int32_t branching_factor)
- : kMaxHeight_(max_height),
- kBranching_(branching_factor),
+ : kMaxHeight_(static_cast<uint16_t>(max_height)),
+ kBranching_(static_cast<uint16_t>(branching_factor)),
kScaledInverseBranching_((Random::kMaxNext + 1) / kBranching_),
compare_(cmp),
allocator_(allocator),