Skip to content

Commit 4a37ab3

Browse files
m0dBm0dB
authored andcommitted
fix debug build
1 parent e185704 commit 4a37ab3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/waveform/renderers/allshader/waveformrendermark.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ class WaveformMarkNode : public rendergraph::GeometryNode {
4646
m_textureHeight = image.height();
4747
}
4848
void update(float x, float y, float devicePixelRatio) {
49-
[[maybe_unused]] const float epsilon = 1e-6f;
50-
DEBUG_ASSERT(std::abs(x - RoundToPixel(devicePixelRatio)(x)) < epsilon);
51-
DEBUG_ASSERT(std::abs(y - RoundToPixel(devicePixelRatio)(y)) < epsilon);
49+
#ifdef MIXXX_DEBUG_ASSERTIONS_ENABLED
50+
const float epsilon = 1e-6f;
51+
auto roundToPixel = createFunctionRoundToPixel(devicePixelRatio);
52+
DEBUG_ASSERT(std::abs(x - roundToPixel(x)) < epsilon);
53+
DEBUG_ASSERT(std::abs(y - roundToPixel(y)) < epsilon);
54+
#endif
5255
TexturedVertexUpdater vertexUpdater{
5356
geometry().vertexDataAs<Geometry::TexturedPoint2D>()};
5457
vertexUpdater.addRectangle({x, y},

0 commit comments

Comments
 (0)