Procházet zdrojové kódy

Close the bal_problem file when done reading it.

Change-Id: I2755822cd2caf4019059e5b4a50f30077142e37f
Markus Moll před 13 roky
rodič
revize
82b689a5fd
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      examples/bal_problem.cc

+ 2 - 0
examples/bal_problem.cc

@@ -83,6 +83,8 @@ BALProblem::BALProblem(const std::string filename, bool use_quaternions) {
     FscanfOrDie(fptr, "%lf", parameters_ + i);
   }
 
+  fclose(fptr);
+
   use_quaternions_ = use_quaternions;
   if (use_quaternions) {
     // Switch the angle-axis rotations to quaternions.