diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2019-02-01 06:10:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2019-02-01 06:10:11 -0600 |
commit | 42e4e042754231f00a55b40d2d6364d8a2c41069 (patch) | |
tree | 1c7e887a1ed5823828aee481278fabe02ad2b533 | |
parent | 80b233440da805ddff73c551c11150bad3560314 (diff) | |
download | ulab-42e4e042754231f00a55b40d2d6364d8a2c41069.tar.gz ulab-42e4e042754231f00a55b40d2d6364d8a2c41069.zip |
Use std::abs() instead of abs()
This fixes a FTBFS on newer versions of GCC
-rw-r--r-- | clients/tde/src/widgets/tracewidget.cpp | 10 |
1 files 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<numberOfSamples-incr; n=n+incr) { // Detect invalid samples and skip drawing of those samples @@ -925,13 +925,13 @@ void CursorData::drawCursor(TQPainter* p, int graticule_width, int graticule_hei } if (orientation == TQt::Vertical) { - int x = (abs(((position)/(100.0))*(virtual_width))-offset); + int x = (std::abs(((position)/(100.0))*(virtual_width))-offset); if ((x >= 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" |