PVS-StudioWarnings

PVS-Studio warning V599 for Angle

Nov 19th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. class Context
  2. {
  3.   ....
  4.   ~Context();
  5.   ....
  6.   virtual void markContextLost();
  7.   ....
  8. };
  9.  
  10. void glDestroyContext(gl::Context *context)
  11. {
  12.   delete context;
  13.  
  14.   if (context == gl::getContext())
  15.   {
  16.     gl::makeCurrent(NULL, NULL, NULL);
  17.   }
  18. }
  19.  
  20. This suspicious code was found in Angle project by PVS-Studio static code analyzer.
  21. Warning message is:
  22. V599 The destructor was not declared as a virtual one, although the 'Context' class contains virtual functions. context.cpp 2955
  23.  
  24. 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