Loading libstats/expresslog/Histogram.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ namespace android { namespace expresslog { Histogram::UniformOptions* Histogram::UniformOptions::create(int binCount, float minValue, float exclusiveMaxValue) { std::shared_ptr<Histogram::UniformOptions> Histogram::UniformOptions::create( int binCount, float minValue, float exclusiveMaxValue) { if (binCount < 1) { ALOGE("Bin count should be positive number"); return nullptr; Loading @@ -38,7 +38,8 @@ Histogram::UniformOptions* Histogram::UniformOptions::create(int binCount, float return nullptr; } return new UniformOptions(binCount, minValue, exclusiveMaxValue); return std::shared_ptr<UniformOptions>( new UniformOptions(binCount, minValue, exclusiveMaxValue)); } Histogram::UniformOptions::UniformOptions(int binCount, float minValue, float exclusiveMaxValue) Loading libstats/expresslog/include/Histogram.h +4 −3 Original line number Diff line number Diff line Loading @@ -46,10 +46,9 @@ public: /** Used by Histogram to map data sample to corresponding bin for uniform bins */ class UniformOptions : public BinOptions { UniformOptions(int binCount, float minValue, float exclusiveMaxValue); public: static UniformOptions* create(int binCount, float minValue, float exclusiveMaxValue); static std::shared_ptr<UniformOptions> create(int binCount, float minValue, float exclusiveMaxValue); int getBinsCount() const override { return mBinCount; Loading @@ -58,6 +57,8 @@ public: int getBinForSample(float sample) const override; private: UniformOptions(int binCount, float minValue, float exclusiveMaxValue); const int mBinCount; const float mMinValue; const float mExclusiveMaxValue; Loading Loading
libstats/expresslog/Histogram.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ namespace android { namespace expresslog { Histogram::UniformOptions* Histogram::UniformOptions::create(int binCount, float minValue, float exclusiveMaxValue) { std::shared_ptr<Histogram::UniformOptions> Histogram::UniformOptions::create( int binCount, float minValue, float exclusiveMaxValue) { if (binCount < 1) { ALOGE("Bin count should be positive number"); return nullptr; Loading @@ -38,7 +38,8 @@ Histogram::UniformOptions* Histogram::UniformOptions::create(int binCount, float return nullptr; } return new UniformOptions(binCount, minValue, exclusiveMaxValue); return std::shared_ptr<UniformOptions>( new UniformOptions(binCount, minValue, exclusiveMaxValue)); } Histogram::UniformOptions::UniformOptions(int binCount, float minValue, float exclusiveMaxValue) Loading
libstats/expresslog/include/Histogram.h +4 −3 Original line number Diff line number Diff line Loading @@ -46,10 +46,9 @@ public: /** Used by Histogram to map data sample to corresponding bin for uniform bins */ class UniformOptions : public BinOptions { UniformOptions(int binCount, float minValue, float exclusiveMaxValue); public: static UniformOptions* create(int binCount, float minValue, float exclusiveMaxValue); static std::shared_ptr<UniformOptions> create(int binCount, float minValue, float exclusiveMaxValue); int getBinsCount() const override { return mBinCount; Loading @@ -58,6 +57,8 @@ public: int getBinForSample(float sample) const override; private: UniformOptions(int binCount, float minValue, float exclusiveMaxValue); const int mBinCount; const float mMinValue; const float mExclusiveMaxValue; Loading