mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
fix const issue in mesh.cpp
member variable can't xt::adopt'ed in const member function
This commit is contained in:
parent
ebdac7ddde
commit
10dfbb81c8
1 changed files with 3 additions and 1 deletions
|
|
@ -158,7 +158,9 @@ std::string StructuredMesh::bin_label(int bin) const
|
|||
|
||||
xt::xtensor<int, 1> 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_});
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue