Skip to content

Commit 255070e

Browse files
committed
Initialize all member data in CaloSD constructor
UBSAN warned that the value for doFineCaloThisStep_ was begin read before it was set.
1 parent eaefa4c commit 255070e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SimG4CMS/Calo/interface/CaloSD.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class CaloSD : public SensitiveCaloDetector,
175175

176176
bool ignoreTrackID;
177177
bool isParameterized;
178-
bool ignoreReject;
178+
bool ignoreReject = false;
179179
bool useMap; // use map for comparison of ID
180180
bool corrTOFBeam;
181181

@@ -197,7 +197,7 @@ class CaloSD : public SensitiveCaloDetector,
197197
std::unordered_map<unsigned int, unsigned int> boundaryCrossingParentMap_;
198198
std::vector<std::unique_ptr<CaloG4Hit>> reusehit[2];
199199
std::vector<Detector> fineDetectors_;
200-
bool doFineCaloThisStep_;
200+
bool doFineCaloThisStep_ = false;
201201
};
202202

203203
#endif // SimG4CMS_CaloSD_h

0 commit comments

Comments
 (0)