From f34d4d2033b1106ea1acfb6cb9ad0b0fb2002989 Mon Sep 17 00:00:00 2001 From: Marisa Heit Date: Sun, 6 Nov 2022 12:50:51 -0600 Subject: [PATCH] Fix compilation on Linux --- src/common/engine/stats.h | 7 +++++++ src/common/objects/dobjgc.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/engine/stats.h b/src/common/engine/stats.h index 2d855bc82..c7473531e 100644 --- a/src/common/engine/stats.h +++ b/src/common/engine/stats.h @@ -48,6 +48,7 @@ public: cycle_t &operator= (const cycle_t &o) { return *this; } void Reset() {} void Clock() {} + void ResetAndClock() {} void Unclock() {} double Time() { return 0; } double TimeMS() { return 0; } @@ -120,6 +121,12 @@ public: Sec -= ts.tv_sec + ts.tv_nsec * 1e-9; } + void ResetAndClock() + { + Reset(); + Clock(); + } + void Unclock() { #ifdef __linux__ diff --git a/src/common/objects/dobjgc.cpp b/src/common/objects/dobjgc.cpp index 8a0f753f1..34199efff 100644 --- a/src/common/objects/dobjgc.cpp +++ b/src/common/objects/dobjgc.cpp @@ -780,7 +780,7 @@ ADD_STAT(gc) void FStepStats::Reset() { - for (int i = 0; i < countof(Count); ++i) + for (unsigned i = 0; i < countof(Count); ++i) { Count[i] = 0; BytesCovered[i] = 0;