Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
- {
- ...
- case IDM_FILE_OPEN:
- // Refer to the tutorial for an example of OnFileOpen
- OnFileOpen();
- return TRUE;
- case IDM_FILE_SAVE:
- // Refer to the tutorial for an example of OnFileSave
- OnFileSave();
- return TRUE;
- case IDM_FILE_SAVEAS:
- // Refer to the tutorial for an example of OnFileSaveAs
- OnFileSave();
- return TRUE;
- ...
- }
- Most likely this is what should be written here: case IDM_FILE_SAVEAS: OnFileSaveAs() ....
- This suspicious code was found in win32-framework project by PVS-Studio static code analyzer.
- Warning message is:
- V525 The code containing the collection of similar blocks. Check items 'OnFileOpen', 'OnFileSave', 'OnFileSave', 'OnFilePrint' in lines 37, 41, 45, 48. Frame mainfrm.cpp 37
- 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