PVS-StudioWarnings

PVS-Studio warning V801 for UnrealEngine4

Nov 20th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. class FVariant
  2. {
  3.   ....
  4.   FVariant& operator=( const TArray<uint8> InArray )
  5.   {
  6.     Type = EVariantTypes::ByteArray;
  7.     Value = InArray;
  8.  
  9.     return *this;
  10.   }
  11.   ....
  12. }
  13.  
  14. This suspicious code was found in UnrealEngine4 project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V801 Decreased performance. It is better to redefine the first function argument as a reference. Consider replacing 'const .. InArray' with 'const .. &InArray'. variant.h 198
  17.  
  18. 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