Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct DIJOYSTATE2 {
- ....
- LONG rglSlider[2];
- ....
- LONG rglVSlider[2];
- ....
- LONG rglASlider[2];
- ....
- LONG rglFSlider[2];
- ....
- } DIJOYSTATE2, *LPDIJOYSTATE2;
- void JoystickState::AssignState(const DIJOYSTATE2 &joystate)
- {
- ....
- for( int i = 0; i < 2; i++ )
- {
- sliders[i] = joystate.rglSlider[i];
- asliders[i] = joystate.rglASlider[i];
- vsliders[i] = joystate.rglVSlider[i];
- fsliders[i] = joystate.rglVSlider[i];
- }
- ....
- }
- This suspicious code was found in SlimDX project by PVS-Studio static code analyzer.
- Warning message is:
- V525 The code containing the collection of similar blocks. Check items 'rglSlider', 'rglASlider', 'rglVSlider', 'rglVSlider' in lines 93, 94, 95, 96. joystickstate.cpp 93
- 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