Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NS_IMETHODIMP
- nsNativeThemeWin::WidgetStateChanged(....)
- {
- ....
- if (aWidgetType == NS_THEME_WINDOW_TITLEBAR ||
- aWidgetType == NS_THEME_WINDOW_TITLEBAR_MAXIMIZED ||
- aWidgetType == NS_THEME_WINDOW_FRAME_LEFT ||
- aWidgetType == NS_THEME_WINDOW_FRAME_RIGHT ||
- aWidgetType == NS_THEME_WINDOW_FRAME_BOTTOM ||
- aWidgetType == NS_THEME_WINDOW_BUTTON_CLOSE ||
- aWidgetType == NS_THEME_WINDOW_BUTTON_MINIMIZE || <<<<====
- aWidgetType == NS_THEME_WINDOW_BUTTON_MINIMIZE || <<<<====
- aWidgetType == NS_THEME_WINDOW_BUTTON_RESTORE) {
- *aShouldRepaint = true;
- return NS_OK;
- ....
- }
- This suspicious code was found in Firefox project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions 'aWidgetType == 237' to the left and to the right of the '||' operator. nsnativethemewin.cpp 2475
- 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