From c28c2f32a81fd9fbd476477798c01db8e0b7cc57 Mon Sep 17 00:00:00 2001 From: Amrita Goswami Date: Sun, 24 Mar 2024 15:09:34 +0000 Subject: [PATCH] CI: Fixed small bug that caused crash on the CI We removed a superfluous `using WeightT = typename Network::WeightT;`. These are present at the top of the class Co-authored-by: Moritz Sallermann --- include/connectivity.hpp | 2 +- include/models/ActivityDrivenModel.hpp | 3 +-- src/config_parser.cpp | 3 ++- test/test_network.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/connectivity.hpp b/include/connectivity.hpp index a9d0159..1af9c8d 100644 --- a/include/connectivity.hpp +++ b/include/connectivity.hpp @@ -75,7 +75,7 @@ class TarjanConnectivityAlgo { lowest[v] = std::min( lowest[v], num[u] ); } // u not processed - } // u has been visited + } // u has been visited } // Now v has been processed diff --git a/include/models/ActivityDrivenModel.hpp b/include/models/ActivityDrivenModel.hpp index 237bbe9..1b0ab83 100644 --- a/include/models/ActivityDrivenModel.hpp +++ b/include/models/ActivityDrivenModel.hpp @@ -60,7 +60,7 @@ class ActivityDrivenModelAbstract : public Model } } - void iteration() override {}; + void iteration() override{}; protected: NetworkT & network; @@ -234,7 +234,6 @@ class ActivityDrivenModelAbstract : public Model void update_network_mean() { - using WeightT = NetworkT::WeightT; std::vector weights( network.n_agents(), 0.0 ); // Set all weights to zero in the beginning diff --git a/src/config_parser.cpp b/src/config_parser.cpp index 63c8456..e0e054e 100644 --- a/src/config_parser.cpp +++ b/src/config_parser.cpp @@ -253,7 +253,8 @@ void validate_settings( const SimulationOptions & options ) { const std::string basic_deff_msg = "The basic Deffuant model has not been implemented with multiple dimensions"; - check( name_and_var( model_settings.dim ), []( auto x ) { return x == 1; }, basic_deff_msg ); + check( + name_and_var( model_settings.dim ), []( auto x ) { return x == 1; }, basic_deff_msg ); } } } diff --git a/test/test_network.cpp b/test/test_network.cpp index f1d2bfa..57239e7 100644 --- a/test/test_network.cpp +++ b/test/test_network.cpp @@ -112,7 +112,7 @@ TEST_CASE( "Testing the network class" ) auto weight = buffer_w[i_neighbour]; std::tuple edge{ neighbour, i_agent, weight - }; // Note that i_agent and neighbour are flipped compared to before + }; // Note that i_agent and neighbour are flipped compared to before REQUIRE( old_edges.contains( edge ) ); // can we find the transposed edge? old_edges.extract( edge ); // extract the edge afterwards }