From 42e4e042754231f00a55b40d2d6364d8a2c41069 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2019 06:10:11 -0600 Subject: Use std::abs() instead of abs() This fixes a FTBFS on newer versions of GCC --- clients/tde/src/widgets/tracewidget.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/tde/src/widgets/tracewidget.cpp b/clients/tde/src/widgets/tracewidget.cpp index bcf89d2..6ce3fa2 100644 --- a/clients/tde/src/widgets/tracewidget.cpp +++ b/clients/tde/src/widgets/tracewidget.cpp @@ -692,7 +692,7 @@ void TraceData::drawTrace(TQPainter* p, int graticule_width, int graticule_heigh rightEdgeIndex = numberOfSamples-1; } } - activeSamples = abs(rightEdgeIndex-leftEdgeIndex); + activeSamples = std::abs(rightEdgeIndex-leftEdgeIndex); incr = (activeSamples/virtual_width)+1; for (n=leftEdgeIndex; n= 0) && (x < graticule_width)) { p->drawLine(x, 0, x, graticule_height); } } else { - int y = abs(((position)/(100.0))*(virtual_height)); + int y = std::abs(((position)/(100.0))*(virtual_height)); p->drawLine(0, y, graticule_width, y); } } @@ -1148,7 +1148,7 @@ void GraticuleWidget::updateGraticule() { TQRectF zoomBox = m_base->zoomBox(); if (!zoomBox.isNull()) { // Translate zoombox coordinates to local drawing coordinates - TQRect drawingRect(abs(((zoomBox.x())/(100.0))*(virtualWidth()))-m_base->horizScrollOffset(), abs(((zoomBox.y())/(100.0))*(height())), abs(((zoomBox.width())/(100.0))*(virtualWidth())), abs(((zoomBox.height())/(100.0))*(height()))); + TQRect drawingRect(std::abs(((zoomBox.x())/(100.0))*(virtualWidth()))-m_base->horizScrollOffset(), std::abs(((zoomBox.y())/(100.0))*(height())), std::abs(((zoomBox.width())/(100.0))*(virtualWidth())), std::abs(((zoomBox.height())/(100.0))*(height()))); p.fillRect(drawingRect, TQBrush(foregroundColor().dark(m_base->m_zoomBoxDarkness), TQt::BDiagPattern)); } @@ -2662,4 +2662,4 @@ TraceWidget* TraceScrollWidget::traceWidget() { return m_traceScrollView->m_traceWidget; } -#include "tracewidget.moc" \ No newline at end of file +#include "tracewidget.moc" -- cgit v1.2.1