Skip to content

Commit

Permalink
CI: Fixed small bug that caused crash on the CI
Browse files Browse the repository at this point in the history
We removed a superfluous `using WeightT = typename Network::WeightT;`.
These are present at the top of the class

Co-authored-by: Moritz Sallermann <[email protected]>
  • Loading branch information
amritagos and MSallermann committed Mar 24, 2024
1 parent 6c0ff3e commit c28c2f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/connectivity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions include/models/ActivityDrivenModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ActivityDrivenModelAbstract : public Model<AgentT_>
}
}

void iteration() override {};
void iteration() override{};

protected:
NetworkT & network;
Expand Down Expand Up @@ -234,7 +234,6 @@ class ActivityDrivenModelAbstract : public Model<AgentT_>

void update_network_mean()
{
using WeightT = NetworkT::WeightT;
std::vector<WeightT> weights( network.n_agents(), 0.0 );

// Set all weights to zero in the beginning
Expand Down
3 changes: 2 additions & 1 deletion src/config_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/test_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ TEST_CASE( "Testing the network class" )
auto weight = buffer_w[i_neighbour];
std::tuple<size_t, size_t, Network::WeightT> 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
}
Expand Down

0 comments on commit c28c2f3

Please sign in to comment.