Minor heap tidy ups.
Change-Id: I496acb08b0bcd70a17a8dcb650a9a4725b4e2720
diff --git a/src/heap.cc b/src/heap.cc
index aa7deb4..1b77d2e 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -765,7 +765,7 @@
}
}
- // Reset the cumulative loggers since we now haave a few additional timing phases.
+ // Reset the cumulative loggers since we now have a few additional timing phases.
// TODO: C++0x
for (CumulativeTimings::iterator it = cumulative_timings_.begin();
it != cumulative_timings_.end(); ++it) {
diff --git a/src/timing_logger.h b/src/timing_logger.h
index d5e998d..a399a28 100644
--- a/src/timing_logger.h
+++ b/src/timing_logger.h
@@ -84,12 +84,8 @@
public:
explicit CumulativeLogger(const char* name = "", bool precise = false)
: name_(name),
- precise_(precise),
- total_time_squared_(0),
- index_(0),
- iterations_(0),
- last_split_(0) {
-
+ precise_(precise) {
+ Reset();
}
void Start() {
@@ -108,10 +104,11 @@
}
void Reset() {
- iterations_ = 0;
times_.clear();
labels_.clear();
times_squared_.clear();
+ iterations_ = 0;
+ total_time_squared_ = 0;
}
void AddPair(const std::string& label, uint64_t delta_time) {