Преглед изворни кода

Wow travis detected (by luck?) that uninitialised variable where one test failed in one specific configuration but no other one..

And thanks valgrind to give me a hint!
Godzil пре 4 година
родитељ
комит
4b4d2b7819
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      source/intersection.cpp

+ 1 - 1
source/intersection.cpp

@@ -14,7 +14,7 @@ Computation Intersection::prepareComputation(Ray r)
     Tuple hitP = r.position(this->t);
     Tuple normalV = this->object->normalAt(hitP);
     Tuple eyeV = -r.direction;
-    bool inside;
+    bool inside = false;
 
     if (normalV.dot(eyeV) < 0)
     {