From b4ac1494a28d38b4087d56a978e33d25263f55f1 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 4 Oct 2021 14:40:56 +0200 Subject: [PATCH] fixed: use multiplication instead of shift operator this implicitly casts to int in the process. if not the shift makes little sense as everything is done for an unsigned char --- src/SIM/SIMbase.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SIM/SIMbase.C b/src/SIM/SIMbase.C index 7d9d183a4..8b0f9ce7a 100644 --- a/src/SIM/SIMbase.C +++ b/src/SIM/SIMbase.C @@ -2270,7 +2270,7 @@ bool SIMbase::setPatchMaterial (size_t patch) const bool SIMbase::addMADOF (unsigned char basis, unsigned char nndof, bool other) { - int key = basis << 16 + nndof; + int key = basis*65536 + nndof; if (extraMADOFs.find(key) != extraMADOFs.end()) return false; // This MADOF already calculated @@ -2314,7 +2314,7 @@ bool SIMbase::addMADOF (unsigned char basis, unsigned char nndof, bool other) const IntVec& SIMbase::getMADOF (unsigned char basis, unsigned char nndof) const { - int key = basis << 16 + nndof; + int key = basis*65536 + nndof; auto it = extraMADOFs.find(key); if (it != extraMADOFs.end()) return it->second;