Ensure a consistent definition of TimingSegment::EPSILON

Since the EPSILON variable in the header file was declared but not assigned any value, it could lead to undefined behavior or calculation errors when the variable is used without initialization.  This ensures a consistent value is always used and is also defined at compile time for further safety.
This commit is contained in:
sukibaby
2024-12-24 22:42:58 -08:00
committed by teejusb
parent dd6956f1cf
commit f57c71bd23
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -4,9 +4,6 @@
#include <vector>
const double TimingSegment::EPSILON = 1e-6;
static const char *TimingSegmentTypeNames[] = {
"BPM",
"Stop",
+1 -1
View File
@@ -64,7 +64,7 @@ struct TimingSegment
m_iStartRow( other.GetRow() ) { }
// for our purposes, two floats within this level of error are equal
static const double EPSILON;
static constexpr double EPSILON = 1e-6;
virtual ~TimingSegment() { }