Bug 748914 - Part 1: implement Histogram::Clear; r=taras

This commit is contained in:
Nathan Froyd 2012-05-08 15:38:50 -04:00
parent d3f72cbbfb
commit 6e12d2a467
2 changed files with 8 additions and 0 deletions

View File

@ -149,6 +149,12 @@ void Histogram::AddSampleSet(const SampleSet& sample) {
sample_.Add(sample);
}
void Histogram::Clear() {
SampleSet ss;
ss.Resize(*this);
sample_ = ss;
}
void Histogram::SetRangeDescriptions(const DescriptionPair descriptions[]) {
DCHECK(false);
}

View File

@ -395,6 +395,8 @@ class Histogram {
virtual void AddSampleSet(const SampleSet& sample);
void Clear();
// This method is an interface, used only by LinearHistogram.
virtual void SetRangeDescriptions(const DescriptionPair descriptions[]);