diff --git a/src/core/nonbonded_interactions/nonbonded_interaction_data.hpp b/src/core/nonbonded_interactions/nonbonded_interaction_data.hpp index 914df563e8..05aa9784e9 100644 --- a/src/core/nonbonded_interactions/nonbonded_interaction_data.hpp +++ b/src/core/nonbonded_interactions/nonbonded_interaction_data.hpp @@ -35,7 +35,6 @@ #include #include #include -#include #include #include @@ -397,7 +396,7 @@ class InteractionsNonBonded : public System::Leaf { auto get_ia_param_key(int i, int j) const { assert(i >= 0 and i <= max_seen_particle_type); assert(j >= 0 and j <= max_seen_particle_type); - auto const key = static_cast( + auto const key = static_cast( Utils::lower_triangular(std::max(i, j), std::min(i, j))); assert(key < m_nonbonded_ia_params.size()); return key; @@ -415,15 +414,15 @@ class InteractionsNonBonded : public System::Leaf { * @return Reference to interaction parameters for the type pair. */ auto &get_ia_param(int i, int j) { - return *m_nonbonded_ia_params.at(get_ia_param_key(i, j)); + return *m_nonbonded_ia_params[get_ia_param_key(i, j)]; } auto const &get_ia_param(int i, int j) const { - return *m_nonbonded_ia_params.at(get_ia_param_key(i, j)); + return *m_nonbonded_ia_params[get_ia_param_key(i, j)]; } auto get_ia_param_ref_counted(int i, int j) const { - return m_nonbonded_ia_params.at(get_ia_param_key(i, j)); + return m_nonbonded_ia_params[get_ia_param_key(i, j)]; } void set_ia_param(int i, int j, std::shared_ptr const &ia) { diff --git a/src/python/espressomd/CMakeLists.txt b/src/python/espressomd/CMakeLists.txt index bd4b5f9eb6..36996be03a 100644 --- a/src/python/espressomd/CMakeLists.txt +++ b/src/python/espressomd/CMakeLists.txt @@ -49,6 +49,7 @@ target_compile_options( espresso_pyx_flags INTERFACE $<$>:-Wno-pedantic> + $<$>:-Wno-cast-qual> $<$>:-Wno-deprecated-declarations> $<$:-diag-disable=1224> $<$:-Wno-cpp>