File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/waveform/renderers/allshader Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff 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},
You can’t perform that action at this time.
0 commit comments