(#396) Using const ref parameters for curve data

This commit is contained in:
Pål Hagen 2015-08-31 10:50:10 +02:00
parent 370764ae50
commit c2b7305f8e
4 changed files with 4 additions and 5 deletions

View File

@ -82,7 +82,7 @@ caf::PdmFieldHandle* RimWellLogPlotCurve::objectToggleField()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotCurve::plot(std::vector<double> depthValues, std::vector<double> values)
void RimWellLogPlotCurve::plot(const std::vector<double>& depthValues, const std::vector<double>& values)
{
CVF_ASSERT(m_plot);
@ -95,7 +95,6 @@ void RimWellLogPlotCurve::plot(std::vector<double> depthValues, std::vector<doub
m_plot->replot();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -41,7 +41,7 @@ public:
virtual ~RimWellLogPlotCurve();
void setPlot(RiuWellLogTracePlot* plot);
void plot(std::vector<double> m_depthValues, std::vector<double> m_values);
void plot(const std::vector<double>& m_depthValues, const std::vector<double>& m_values);
size_t pointCount() const;
const double* depthValues() const;

View File

@ -77,7 +77,7 @@ caf::PdmFieldHandle* RimWellLogPlotTrace::objectToggleField()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrace::addCurve(std::vector<double>& depthValues, std::vector<double>& values)
void RimWellLogPlotTrace::addCurve(const std::vector<double>& depthValues, const std::vector<double>& values)
{
CVF_ASSERT(m_viewer);

View File

@ -42,7 +42,7 @@ public:
virtual ~RimWellLogPlotTrace();
void setViewer(RiuWellLogTracePlot* viewer);
void addCurve(std::vector<double>& depthValues, std::vector<double>& values);
void addCurve(const std::vector<double>& depthValues, const std::vector<double>& values);
RiuWellLogTracePlot* viewer();