From ebab2e2d42bd13a85b355264603d63f9f988572f Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Thu, 19 Oct 2017 10:48:47 -0700 Subject: 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 --- memtable/inlineskiplist.h | 4 ++-- memtable/skiplist.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'memtable') 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::InlineSkipList(const Comparator cmp, Allocator* allocator, int32_t max_height, int32_t branching_factor) - : kMaxHeight_(max_height), - kBranching_(branching_factor), + : kMaxHeight_(static_cast(max_height)), + kBranching_(static_cast(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 SkipList::SkipList(const Comparator cmp, Allocator* allocator, int32_t max_height, int32_t branching_factor) - : kMaxHeight_(max_height), - kBranching_(branching_factor), + : kMaxHeight_(static_cast(max_height)), + kBranching_(static_cast(branching_factor)), kScaledInverseBranching_((Random::kMaxNext + 1) / kBranching_), compare_(cmp), allocator_(allocator), -- cgit v1.2.3-70-g09d2