Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- G4bool G4CollisionMesonBaryonElastic::
- IsInCharge(const G4KineticTrack& trk1,
- const G4KineticTrack& trk2) const
- {
- G4bool result = false;
- G4ParticleDefinition * p1 = trk1.GetDefinition();
- G4ParticleDefinition * p2 = trk2.GetDefinition();
- if( (GetNumberOfPartons(p1) != 2 ||
- GetNumberOfPartons(p2) != 3)
- ||(GetNumberOfPartons(p1) != 3 ||
- GetNumberOfPartons(p2) != 2) )
- {
- result = false;
- }
- ....
- }
- This suspicious code was found in Geant4 project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression is always true. Probably the '&&' operator should be used here. G4had_im_r_matrix g4collisionmesonbaryonelastic.cc 53
- 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