Skip to content

Commit 9e9fd82

Browse files
authored
Set default values for member variables
Initialized variables with default values for clarity.
1 parent e3dd8bd commit 9e9fd82

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

PWGLF/Tasks/Nuspex/nucleitpcpbpb.cxx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,17 @@ struct NucleitpcPbPb {
243243

244244
std::vector<PrimParticles> primaryParticles;
245245
std::vector<float> primVtx, cents;
246-
bool collHasCandidate, collPassedEvSel;
247-
int mRunNumber, occupancy;
248-
float dBz;
249-
TRandom3 rand;
250-
float proton = 1;
251-
float de = 2;
252-
float triton = 3;
253-
float he3 = 4;
254-
float he4 = 5;
246+
bool collHasCandidate = false;
247+
bool collPassedEvSel = false;
248+
int mRunNumber = 0;
249+
int occupancy = 0;
250+
float dBz = 0.0f;
251+
TRandom3 rand;
252+
float proton = 1;
253+
float de = 2;
254+
float triton = 3;
255+
float he3 = 4;
256+
float he4 = 5;
255257

256258
//----------------------------------------------------------------------------------------------------------------
257259
void init(InitContext const&)

0 commit comments

Comments
 (0)