From ddd9aab8c68e9d0bf01d4f3e0aec712aa0237611 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Tue, 17 Oct 2023 12:24:49 +0200 Subject: [PATCH] merge 2 fcts --- Device/Data/Datafield.cpp | 7 +------ Device/Data/Datafield.h | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Device/Data/Datafield.cpp b/Device/Data/Datafield.cpp index 38a8185c000..7f34ed8f7d7 100644 --- a/Device/Data/Datafield.cpp +++ b/Device/Data/Datafield.cpp @@ -446,11 +446,6 @@ Datafield Datafield::normalizedToMax() const } std::vector<std::vector<double>> Datafield::values2D() const -{ - return to2Dvector(m_values); -} - -std::vector<std::vector<double>> Datafield::to2Dvector(const std::vector<double>& in) const { ASSERT(rank() == 2); std::vector<std::vector<double>> result; @@ -463,7 +458,7 @@ std::vector<std::vector<double>> Datafield::to2Dvector(const std::vector<double> for (size_t row = 0; row < nrows; ++row) { result[row].resize(ncols, 0.0); for (size_t col = 0; col < ncols; ++col) - result[row][col] = in[row * ncols + col]; + result[row][col] = m_values[row * ncols + col]; } return result; diff --git a/Device/Data/Datafield.h b/Device/Data/Datafield.h index 90c67110260..e2062e0f7c5 100644 --- a/Device/Data/Datafield.h +++ b/Device/Data/Datafield.h @@ -167,8 +167,6 @@ private: //! between [xbinlow, xbinup]. Datafield* create_yProjection(int xbinlow, int xbinup) const; - std::vector<std::vector<double>> to2Dvector(const std::vector<double>& in) const; - #endif // SWIG }; -- GitLab