Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef std::vector<G4Parton *> G4PartonVector;
- inline
- void G4ExcitedString::InsertParton(
- G4Parton *aParton, const G4Parton * addafter)
- {
- G4PartonVector::iterator insert_index;
- ....
- if ( addafter != NULL )
- {
- insert_index=std::find(thePartons.begin(),
- thePartons.end(), addafter);
- ....
- }
- thePartons.insert(insert_index+1, aParton);
- }
- This suspicious code was found in Geant4 project by PVS-Studio static code analyzer.
- Warning message is:
- V614 Potentially uninitialized iterator 'insert_index' used. g4excitedstring.hh 193
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment