diff --git a/include/base_set.h b/include/base_set.h index 88cac91c8c..7218365001 100644 --- a/include/base_set.h +++ b/include/base_set.h @@ -336,11 +336,12 @@ struct hash { size_t operator()( const BASE_SET& bs ) const { - size_t hash = 0; + size_t hashVal = 0; + for( const auto& bit : bs ) - hash = hash * 31 + std::hash()( bit ); + hashVal = hashVal * 31 + std::hash()( bit ); - return hash; + return hashVal; } }; } // namespace std