提交 4dc02f7b 编写于 作者: A Abhishek Kona

Initialize all doubles to 0 in histogram.cc

Summary:
The existing code did not initialize a few doubles in histogram.cc.
Cropped up when I wrote a unit-test.

Test Plan: make all check

Reviewers: chip

Reviewed By: chip

CC: leveldb

Differential Revision: https://reviews.facebook.net/D8319
上级 009034cf
...@@ -58,6 +58,11 @@ namespace { ...@@ -58,6 +58,11 @@ namespace {
Histogram::Histogram() : Histogram::Histogram() :
min_(bucketMapper.LastValue()),
max_(0),
num_(0),
sum_(0),
sum_squares_(0),
buckets_(std::vector<uint64_t>(bucketMapper.BucketCount(), 0)) {} buckets_(std::vector<uint64_t>(bucketMapper.BucketCount(), 0)) {}
void Histogram::Clear() { void Histogram::Clear() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册