Skip to content

Commit

Permalink
Initialise pointer for correct behaviour
Browse files Browse the repository at this point in the history
This was issuing a warning due to it being potentially uninitialised,
leading to undefined behaviour, specially in optimised builds.

Signed-off-by: Rodrigo Tobar <[email protected]>
  • Loading branch information
rtobar committed Jul 4, 2024
1 parent 1a689de commit c065b8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dark_matter_halos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ void DarkMatterHalos::cooling_gas_sAM(Subhalo &subhalo, double z){

float DarkMatterHalos::enclosed_total_mass(const Subhalo &subhalo, double z, float r){

ConstGalaxyPtr galaxy;
ConstGalaxyPtr galaxy = nullptr;

double mvir = 0;
double rvir = 0;
Expand Down

0 comments on commit c065b8b

Please sign in to comment.