From 7d2b578c068d4e78250884c576c892b0a609d789 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 7 Apr 2016 17:33:35 -0300 Subject: LinePlot: less pointers to GDrawings. --- lineplot.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lineplot.cpp') diff --git a/lineplot.cpp b/lineplot.cpp index 0e9e001..35654be 100644 --- a/lineplot.cpp +++ b/lineplot.cpp @@ -60,20 +60,18 @@ void LinePlot::setColorScale(const ColorScale *scale) void LinePlot::relax() { - m_gdFinalPtr.reset(new GraphDrawing); - *m_gdFinalPtr.get() = *m_gdBundlePtr.get(); - m_gdFinalPtr.get()->interpolate(*m_gdPtr.get(), m_relaxation); + m_gdFinal = m_gdBundle; + m_gdFinal.interpolate(*m_gdPtr.get(), m_relaxation); setLinesChanged(true); } void LinePlot::bundle() { - m_gdBundlePtr.reset(new GraphDrawing); - *m_gdBundlePtr.get() = *m_gdPtr.get(); + m_gdBundle = *m_gdPtr.get(); CPUBundling bundling(std::min(width(), height())); - bundling.setInput(m_gdBundlePtr.get()); + bundling.setInput(&m_gdBundle); bundling.niter = m_iterations; bundling.h = m_kernelSize; -- cgit v1.2.3