]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make StatHist::clear inline to reduce dependencies
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 14 May 2012 12:45:54 +0000 (00:45 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 14 May 2012 12:45:54 +0000 (00:45 +1200)
src/StatHist.cc
src/StatHist.h
src/tests/stub_StatHist.cc

index 422ea742ce8a9df465a8cf9ca00f82e867edbd4a..a56c547d79d3866b2b0570b8448de20f36264808 100644 (file)
@@ -59,14 +59,6 @@ StatHist::init(unsigned int newCapacity, hbase_f * val_in_, hbase_f * val_out_,
     scale_ = capacity_ / val_in(max_ - min_);
 }
 
-void
-StatHist::clear()
-{
-    xfree(bins); // can handle case of bins being NULL
-    bins=NULL;
-    capacity_=0; // mark as destructed, may be needed for troubleshooting
-}
-
 StatHist::StatHist(const StatHist &src) :
         capacity_(src.capacity_), min_(src.min_), max_(src.max_),
         scale_(src.scale_), val_in(src.val_in), val_out(src.val_out)
index b422ce7ba7335a8b9917ce6a832241652af9357d..05db3112715e934bfb12e22a51e009cceb9497c2 100644 (file)
@@ -148,4 +148,12 @@ StatHist::StatHist() :
         scale_(1.0), val_in(NULL), val_out(NULL)
 {}
 
+inline void
+StatHist::clear()
+{
+    xfree(bins); // can handle case of bins being NULL
+    bins=NULL;
+    capacity_=0; // mark as destructed, may be needed for troubleshooting
+}
+
 #endif /* STATHIST_H_ */
index cf0cfdfd4ea21c35ed458ce904ee9a616e0a69a3..f3d70947d3c53755be9f9b3ad9889d8d73263300 100644 (file)
@@ -24,10 +24,6 @@ double
 statHistDeltaPctile(const StatHist & A, const StatHist & B, double pctile)
 STUB_RETVAL(0.0)
 
-void
-StatHist::clear()
-STUB
-
 void
 StatHist::logInit(unsigned int i, double d1, double d2)
 STUB