mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Use std::clamp and remove obsolete includes of cvfMath
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
#include "RigFlowDiagSolverInterface.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
//#include "cvfTrace.h"
|
||||
#include "cvfMath.h"
|
||||
|
||||
#include "qwt_legend.h"
|
||||
#include "qwt_picker_machine.h"
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#include "RiuQwtPlotWheelZoomer.h"
|
||||
|
||||
#include "cvfMath.h"
|
||||
|
||||
#include "qwt_plot.h"
|
||||
#include "qwt_scale_div.h"
|
||||
#include <QEvent>
|
||||
@@ -60,8 +58,8 @@ void RiuQwtPlotWheelZoomer::zoomOnAxis( QwtPlot* plot, QwtPlot::Axis axis, doubl
|
||||
double maxValue =
|
||||
std::max( RIU_LOGARITHMIC_MINIMUM, 10.0 * std::max( axisRange.minValue(), axisRange.maxValue() ) );
|
||||
|
||||
newMin = cvf::Math::clamp( newMin, minValue, maxValue );
|
||||
newMax = cvf::Math::clamp( newMax, minValue, maxValue );
|
||||
newMin = std::clamp( newMin, minValue, maxValue );
|
||||
newMax = std::clamp( newMax, minValue, maxValue );
|
||||
}
|
||||
|
||||
plot->setAxisScale( axis, newMin, newMax );
|
||||
|
||||
@@ -100,7 +100,7 @@ void RiuScalarMapperLegendFrame::layoutInfo( LayoutInfo* layout ) const
|
||||
double t = 0.0;
|
||||
if ( m_scalarMapper.notNull() )
|
||||
{
|
||||
t = cvf::Math::clamp( m_scalarMapper->normalizedValue( m_tickValues[i] ), 0.0, 1.1 );
|
||||
t = std::clamp( m_scalarMapper->normalizedValue( m_tickValues[i] ), 0.0, 1.1 );
|
||||
}
|
||||
|
||||
if ( i == 0 )
|
||||
|
||||
Reference in New Issue
Block a user