Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BOOL operator==(const _tagMODULEINFO mi) const
- {
- return ((hModule==mi.hModule)&
- (sModuleFileName.CompareNoCase(mi.sModuleFileName)==0));
- }
- This code doesn't contain errors, but it can be made more efficient. There's no need in creating a copy of the _tagMODULEINFO structure each time when calling the '==' operator. The V801 message points out that "const _tagMODULEINFO mi" can be replaced with "const _tagMODULEINFO &mi".
- This suspicious code was found in Ultimate ToolBox project by PVS-Studio static code analyzer.
- Warning message is:
- V801 Decreased performance. It is better to redefine the first function argument as a reference. Consider replacing 'const .. mi' with 'const .. &mi'. UT oxdllmanager.h 123
- 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
Advertisement