don't call constructor and assignment operator

This commit is contained in:
Stephen Birarda 2013-04-12 16:51:59 -07:00
parent 1415a25302
commit 787bebb5fc

View file

@ -33,20 +33,40 @@
// int sampleAt; // int sampleAt;
CounterStatHistory::CounterStatHistory() { CounterStatHistory::CounterStatHistory() :
init(); currentCount(0),
currentDelta(0),
currentTime(0.0),
lastCount(0),
lastTime(0.0),
totalTime(0.0),
sampleAt(-1),
sampleCount(0) {
} }
CounterStatHistory::CounterStatHistory(std::string myName) { CounterStatHistory::CounterStatHistory(std::string myName) :
init(); name(myName),
name = myName; currentCount(0),
currentDelta(0),
currentTime(0.0),
lastCount(0),
lastTime(0.0),
totalTime(0.0),
sampleAt(-1),
sampleCount(0) {
} }
CounterStatHistory::CounterStatHistory(std::string myName, double initialTime, long initialCount) {
init(); CounterStatHistory::CounterStatHistory(std::string myName, double initialTime, long initialCount) :
lastCount = currentCount = initialCount; name(myName),
lastTime = currentTime = totalTime = initialTime; currentCount(initialCount),
name = myName; currentDelta(0),
currentTime(initialTime),
lastCount(initialCount),
lastTime(initialTime),
totalTime(initialTime),
sampleAt(-1),
sampleCount(0) {
} }
void CounterStatHistory::init() { void CounterStatHistory::init() {