PVS-StudioWarnings

PVS-Studio warning V803 for UnrealEngine4

Nov 18th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. void FSlateNotificationManager::GetWindows(
  2.   TArray< TSharedRef<SWindow> >& OutWindows) const
  3. {
  4.   for( auto Iter(NotificationLists.CreateConstIterator());
  5.        Iter; Iter++ )
  6.   {
  7.     TSharedPtr<SNotificationList> NotificationList = *Iter;
  8.     ....
  9.   }
  10. }
  11.  
  12. This suspicious code was found in UnrealEngine4 project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V803 Decreased performance. In case 'Iter' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. notificationmanager.cpp 100
  15.  
  16. 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