diff --git a/src/OpenMesh/Tools/Utils/Gnuplot.cc b/src/OpenMesh/Tools/Utils/Gnuplot.cc index 88e91607..bf852619 100644 --- a/src/OpenMesh/Tools/Utils/Gnuplot.cc +++ b/src/OpenMesh/Tools/Utils/Gnuplot.cc @@ -126,7 +126,7 @@ Gnuplot::Gnuplot(const string &style) Gnuplot::Gnuplot(const string &title, const string &style, const string &labelx, const string &labely, - vector x, vector y) + const vector& x, const vector& y) { init(); @@ -157,7 +157,7 @@ Gnuplot::Gnuplot(const string &title, Gnuplot::Gnuplot(const string &title, const string &style, const string &labelx, const string &labely, - vector x) + const vector& x) { init(); @@ -349,7 +349,7 @@ void Gnuplot::plot_equation(const string &equation, const string &title) // ---------------------------------------------------------------------------- -void Gnuplot::plot_x(vector d, const string &title) +void Gnuplot::plot_x(const vector& d, const string &title) { ofstream tmp; ostringstream cmdstr; @@ -418,7 +418,7 @@ void Gnuplot::plot_x(vector d, const string &title) // ---------------------------------------------------------------------------- -void Gnuplot::plot_xy(vector x, vector y, const string &title) +void Gnuplot::plot_xy(const vector& x, const vector& y, const string &title) { ofstream tmp; ostringstream cmdstr; diff --git a/src/OpenMesh/Tools/Utils/Gnuplot.hh b/src/OpenMesh/Tools/Utils/Gnuplot.hh index faf2e50c..0f6599e4 100644 --- a/src/OpenMesh/Tools/Utils/Gnuplot.hh +++ b/src/OpenMesh/Tools/Utils/Gnuplot.hh @@ -120,14 +120,14 @@ public: const string & _style, const string & _xlabel, const string & _ylabel, - vector _x, vector _y); + const vector& _x, const vector& _y); /// Constructor calling plot_x(). Gnuplot(const string &_title, const string &_style, const string &_xlabel, const string &_ylabel, - vector _x); + const vector& _x); //@} ~Gnuplot(); @@ -146,10 +146,10 @@ public: //@{ /// Plot a single vector - void plot_x(vector _x, const string &_title); + void plot_x(const vector& _x, const string &_title); /// Plot x,y pairs - void plot_xy(vector _x, vector _y, const string &_title); + void plot_xy(const vector& _x, const vector& _y, const string &_title); /// Plot an equation of the form: y = ax + b /// You supply a and b