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;
CounterStatHistory::CounterStatHistory() {
init();
CounterStatHistory::CounterStatHistory() :
currentCount(0),
currentDelta(0),
currentTime(0.0),
lastCount(0),
lastTime(0.0),
totalTime(0.0),
sampleAt(-1),
sampleCount(0) {
}
CounterStatHistory::CounterStatHistory(std::string myName) {
init();
name = myName;
CounterStatHistory::CounterStatHistory(std::string 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();
lastCount = currentCount = initialCount;
lastTime = currentTime = totalTime = initialTime;
name = myName;
CounterStatHistory::CounterStatHistory(std::string myName, double initialTime, long initialCount) :
name(myName),
currentCount(initialCount),
currentDelta(0),
currentTime(initialTime),
lastCount(initialCount),
lastTime(initialTime),
totalTime(initialTime),
sampleAt(-1),
sampleCount(0) {
}
void CounterStatHistory::init() {