Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum EHAlign { Left, Middle , Right };
- enum EVAlign { Top, Center , Bottom };
- void CxStatic::SetHAlign(EHAlign enuHAlign)
- {
- ...
- if (enuHAlign == Center)
- ...
- }
- This is what should have been written here:: if (enuHAlign == Middle)
- This suspicious code was found in XuiFramework project by PVS-Studio static code analyzer.
- Warning message is:
- V556 The values of different enum types are compared: enuHAlign == Center. Borne cxstatic.cpp 151
- 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