From 6b561d151449b298a6ec8f2d41f781a965c15fbd Mon Sep 17 00:00:00 2001 From: Ben Cumming <bcumming@cscs.ch> Date: Fri, 25 Sep 2020 15:54:40 +0200 Subject: [PATCH] remove spurious const_cast (#1161) --- arbor/backends/gpu/shared_state.cpp | 2 +- arbor/backends/multicore/shared_state.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arbor/backends/gpu/shared_state.cpp b/arbor/backends/gpu/shared_state.cpp index 6b8d26e3..93489f1a 100644 --- a/arbor/backends/gpu/shared_state.cpp +++ b/arbor/backends/gpu/shared_state.cpp @@ -192,7 +192,7 @@ std::ostream& operator<<(std::ostream& o, shared_state& s) { o << " conductivity " << s.conductivity << "\n"; for (auto& ki: s.ion_data) { auto& kn = ki.first; - auto& i = const_cast<ion_state&>(ki.second); + auto& i = ki.second; o << " " << kn << "/current_density " << i.iX_ << "\n"; o << " " << kn << "/reversal_potential " << i.eX_ << "\n"; o << " " << kn << "/internal_concentration " << i.Xi_ << "\n"; diff --git a/arbor/backends/multicore/shared_state.cpp b/arbor/backends/multicore/shared_state.cpp index 8749ac69..dfdc70b1 100644 --- a/arbor/backends/multicore/shared_state.cpp +++ b/arbor/backends/multicore/shared_state.cpp @@ -258,7 +258,7 @@ std::ostream& operator<<(std::ostream& out, const shared_state& s) { out << "conductivity " << csv(s.conductivity) << "\n"; for (const auto& ki: s.ion_data) { auto& kn = ki.first; - auto& i = const_cast<ion_state&>(ki.second); + auto& i = ki.second; out << kn << "/current_density " << csv(i.iX_) << "\n"; out << kn << "/reversal_potential " << csv(i.eX_) << "\n"; out << kn << "/internal_concentration " << csv(i.Xi_) << "\n"; -- GitLab