Skip to content

Commit

Permalink
compile without errors
Browse files Browse the repository at this point in the history
  • Loading branch information
akyo8 committed Mar 5, 2021
1 parent 4649e50 commit 20a1192
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/leveldb/db/skiplist.h
Expand Up @@ -343,7 +343,7 @@ void SkipList<Key, Comparator>::Insert(const Key& key) {
// Our data structure does not allow duplicate insertion
assert(x == nullptr || !Equal(key, x->key));

int height = RandomHeight();
int64_t height = RandomHeight();
if (height > GetMaxHeight()) {
for (int i = GetMaxHeight(); i < height; i++) {
prev[i] = head_;
Expand Down
4 changes: 2 additions & 2 deletions src/test/allocator_tests.cpp
Expand Up @@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(arena_tests)
class TestLockedPageAllocator: public LockedPageAllocator
{
public:
TestLockedPageAllocator(int count_in, int lockedcount_in): count(count_in), lockedcount(lockedcount_in) {}
TestLockedPageAllocator(int64_t count_in, int lockedcount_in) : count(count_in), lockedcount(lockedcount_in) {}
void* AllocateLocked(size_t len, bool *lockingSuccess) override
{
*lockingSuccess = false;
Expand All @@ -156,7 +156,7 @@ class TestLockedPageAllocator: public LockedPageAllocator
return std::numeric_limits<size_t>::max();
}
private:
int count;
int64_t count;
int lockedcount;
};

Expand Down
2 changes: 1 addition & 1 deletion src/test/scheduler_tests.cpp
Expand Up @@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE(manythreads)

std::mutex counterMutex[10];
int counter[10] = { 0 };
FastRandomContext rng{/* fDeterministic */ true};
FastRandomContext rng(ArithToUint256(arith_uint256(42)));
auto zeroToNine = [](FastRandomContext& rc) -> int { return rc.randrange(10); }; // [0, 9]
auto randomMsec = [](FastRandomContext& rc) -> int { return -11 + (int)rc.randrange(1012); }; // [-11, 1000]
auto randomDelta = [](FastRandomContext& rc) -> int { return -1000 + (int)rc.randrange(2001); }; // [-1000, 1000]
Expand Down

0 comments on commit 20a1192

Please sign in to comment.