From 10dfbb81c8abc44ed2c6476e1b598d1aea1277ed Mon Sep 17 00:00:00 2001 From: Olaf Schumann Date: Thu, 13 Jan 2022 19:24:59 +0100 Subject: [PATCH] fix const issue in mesh.cpp member variable can't xt::adopt'ed in const member function --- src/mesh.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesh.cpp b/src/mesh.cpp index 6654684acf..fa97318645 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -158,7 +158,9 @@ std::string StructuredMesh::bin_label(int bin) const xt::xtensor StructuredMesh::get_x_shape() const { - return xt::adapt(shape_, {n_dimension_}); + // because method is const, shape_ is const as well and can't be adapted + auto tmp_shape = shape_; + return xt::adapt(tmp_shape, {n_dimension_}); } //==============================================================================