From d43197ccc7f62f911ab4271411c23f765eb750ab Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Fri, 10 Jan 2020 15:15:46 +0000 Subject: [PATCH] public access to gnuplot path --- lib/Core/Plot.cpp | 4 +++- lib/Core/Plot.hpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Core/Plot.cpp b/lib/Core/Plot.cpp index 7c87a52..0cde425 100644 --- a/lib/Core/Plot.cpp +++ b/lib/Core/Plot.cpp @@ -580,7 +580,7 @@ Plot & Plot::operator<<(PlotModifier &&modifier) } // find gnuplot //////////////////////////////////////////////////////////////// -void Plot::getProgramPath(void) +std::string Plot::getProgramPath(void) { int i, j, lg; char *path; @@ -640,6 +640,8 @@ void Plot::getProgramPath(void) buf[lg] = 0; gnuplotPath_ = buf; } + + return gnuplotPath_; } // plot parsing and output ///////////////////////////////////////////////////// diff --git a/lib/Core/Plot.hpp b/lib/Core/Plot.hpp index bbc1c47..024bca2 100644 --- a/lib/Core/Plot.hpp +++ b/lib/Core/Plot.hpp @@ -381,9 +381,9 @@ public: friend std::ostream & operator<<(std::ostream &out, const Plot &plot); // plot reset void reset(void); -private: // find gnuplot - void getProgramPath(void); + std::string getProgramPath(void); +private: // default options void initOptions(void); private: