Przeglądaj źródła

Fixed warning: operation on ‘currentDirection’ may be undefined.

bkaradzic 12 lat temu
rodzic
commit
35aa2d75c7
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      examples/14-shadowvolumes/shadowvolumes.cpp

+ 1 - 1
examples/14-shadowvolumes/shadowvolumes.cpp

@@ -2443,7 +2443,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
 				++stateStep;
 				if (stateStep >= ( (stateChange & ~0x1) >> 1) )
 				{
-					currentDirection = (++currentDirection) & directionMask;
+					currentDirection = (currentDirection + 1) & directionMask;
 					stateStep = 0;
 					++stateChange;
 				}