Janitor : Use const ref when possible (2)

This commit is contained in:
Magne Sjaastad
2019-11-03 14:08:21 +01:00
parent b46124efd7
commit cd054f2170
18 changed files with 87 additions and 83 deletions

View File

@@ -42,14 +42,14 @@ RiuPlotAnnotationTool::~RiuPlotAnnotationTool()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot* plot,
const std::vector<QString>& names,
const std::pair<double, double> xRange,
const std::vector<std::pair<double, double>> yPositions,
RegionDisplay regionDisplay,
const caf::ColorTable& colorTable,
int shadingAlphaByte,
bool showNames /*= true */,
void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot* plot,
const std::vector<QString>& names,
const std::pair<double, double> xRange,
const std::vector<std::pair<double, double>>& yPositions,
RegionDisplay regionDisplay,
const caf::ColorTable& colorTable,
int shadingAlphaByte,
bool showNames /*= true */,
TrackSpan trackSpan /*= FULL_WIDTH*/ )
{
if ( names.size() != yPositions.size() ) return;
@@ -131,7 +131,7 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
//--------------------------------------------------------------------------------------------------
void RiuPlotAnnotationTool::attachWellPicks( QwtPlot* plot,
const std::vector<QString>& names,
const std::vector<double> yPositions )
const std::vector<double>& yPositions )
{
detachAllAnnotations();

View File

@@ -58,16 +58,16 @@ public:
RiuPlotAnnotationTool(){};
~RiuPlotAnnotationTool();
void attachNamedRegions( QwtPlot* plot,
const std::vector<QString>& names,
const std::pair<double, double> xRange,
const std::vector<std::pair<double, double>> yPositions,
RegionDisplay regionDisplay,
const caf::ColorTable& colorTable,
int shadingAlphaByte,
bool showNames = true,
TrackSpan trackSpan = FULL_WIDTH );
void attachWellPicks( QwtPlot* plot, const std::vector<QString>& names, const std::vector<double> yPositions );
void attachNamedRegions( QwtPlot* plot,
const std::vector<QString>& names,
const std::pair<double, double> xRange,
const std::vector<std::pair<double, double>>& yPositions,
RegionDisplay regionDisplay,
const caf::ColorTable& colorTable,
int shadingAlphaByte,
bool showNames = true,
TrackSpan trackSpan = FULL_WIDTH );
void attachWellPicks( QwtPlot* plot, const std::vector<QString>& names, const std::vector<double>& yPositions );
void attachAnnotationLine( QwtPlot* plot, const QColor& color, const QString& annotationText, const double yPosition );

View File

@@ -192,9 +192,9 @@ void RiuPvtPlotWidget::plotCurves( RiaEclipseUnitTools::UnitSystem
const std::vector<RigFlowDiagSolverInterface::PvtCurve>& curveArr,
double pressure,
double pointMarkerYValue,
QString pointMarkerLabel,
QString plotTitle,
QString yAxisTitle )
const QString& pointMarkerLabel,
const QString& plotTitle,
const QString& yAxisTitle )
{
m_qwtPlot->detachItems( QwtPlotItem::Rtti_PlotCurve );
m_qwtPlot->detachItems( QwtPlotItem::Rtti_PlotMarker );
@@ -567,10 +567,10 @@ RiuPvtPlotPanel::~RiuPvtPlotPanel() {}
void RiuPvtPlotPanel::setPlotData( RiaEclipseUnitTools::UnitSystem unitSystem,
const std::vector<RigFlowDiagSolverInterface::PvtCurve>& fvfCurveArr,
const std::vector<RigFlowDiagSolverInterface::PvtCurve>& viscosityCurveArr,
FvfDynProps fvfDynProps,
ViscosityDynProps viscosityDynProps,
CellValues cellValues,
QString cellReferenceText )
const FvfDynProps& fvfDynProps,
const ViscosityDynProps& viscosityDynProps,
const CellValues& cellValues,
const QString& cellReferenceText )
{
// cvf::Trace::show("RiuPvtPlotPanel::setPlotData()");

View File

@@ -63,9 +63,9 @@ public:
const std::vector<RigFlowDiagSolverInterface::PvtCurve>& curveArr,
double pressure,
double pointMarkerYValue,
QString pointMarkerLabel,
QString plotTitle,
QString yAxisTitle );
const QString& pointMarkerLabel,
const QString& plotTitle,
const QString& yAxisTitle );
void applyFontSizes( bool replot );
private:
@@ -127,10 +127,10 @@ public:
void setPlotData( RiaEclipseUnitTools::UnitSystem unitSystem,
const std::vector<RigFlowDiagSolverInterface::PvtCurve>& fvfCurveArr,
const std::vector<RigFlowDiagSolverInterface::PvtCurve>& viscosityCurveArr,
FvfDynProps fvfDynProps,
ViscosityDynProps viscosityDynProps,
CellValues cellValues,
QString cellReferenceText );
const FvfDynProps& fvfDynProps,
const ViscosityDynProps& viscosityDynProps,
const CellValues& cellValues,
const QString& cellReferenceText );
void clearPlot();
RiuPvtPlotUpdater* plotUpdater();
void applyFontSizes( bool replot );

View File

@@ -184,8 +184,8 @@ void RiuRelativePermeabilityPlotPanel::setPlotData( RiaEclipseUnitTools::UnitSys
const std::vector<RigFlowDiagSolverInterface::RelPermCurve>& relPermCurves,
double swat,
double sgas,
QString caseName,
QString cellReferenceText )
const QString& caseName,
const QString& cellReferenceText )
{
// cvf::Trace::show("Set RelPerm plot data");

View File

@@ -52,8 +52,8 @@ public:
const std::vector<RigFlowDiagSolverInterface::RelPermCurve>& relPermCurves,
double swat,
double sgas,
QString caseName,
QString cellReferenceText );
const QString& caseName,
const QString& cellReferenceText );
void clearPlot();
RiuRelativePermeabilityPlotUpdater* plotUpdater();
void applyFontSizes( bool replot );

View File

@@ -357,7 +357,7 @@ void RiuWellPathComponentPlotItem::addMarker( double posX
int size,
RiuQwtSymbol::PointSymbolEnum symbolType,
cvf::Color4f baseColor,
QString label /*= QString("")*/,
const QString& label /*= QString("")*/,
Qt::Alignment labelAlignment /*= Qt::AlignTop*/,
Qt::Orientation labelOrientation /*= Qt::Vertical*/,
bool drawLine /*= false*/,
@@ -384,7 +384,7 @@ QwtPlotItem* RiuWellPathComponentPlotItem::createMarker( double
int size,
RiuQwtSymbol::PointSymbolEnum symbolType,
cvf::Color4f baseColor,
QString label /*= QString("")*/,
const QString& label /*= QString("")*/,
Qt::Alignment labelAlignment /*= Qt::AlignTop*/,
Qt::Orientation labelOrientation /*= Qt::Vertical*/,
bool drawLine /*= false*/,

View File

@@ -85,7 +85,7 @@ private:
int size,
RiuQwtSymbol::PointSymbolEnum symbolType,
cvf::Color4f baseColor,
QString label = QString( "" ),
const QString& label = QString( "" ),
Qt::Alignment labelAlignment = Qt::AlignVCenter | Qt::AlignRight,
Qt::Orientation labelOrientation = Qt::Horizontal,
bool drawLine = false,
@@ -95,7 +95,7 @@ private:
int size,
RiuQwtSymbol::PointSymbolEnum symbolType,
cvf::Color4f baseColor,
QString label = QString( "" ),
const QString& label = QString( "" ),
Qt::Alignment labelAlignment = Qt::AlignVCenter | Qt::AlignRight,
Qt::Orientation labelOrientation = Qt::Horizontal,
bool drawLine = false,