chiark / gitweb /
C++, STOGO, and nocedal fixes
[nlopt.git] / stogo / stogo.cc
index 69a4f8d32427fe8b7814e8e1c803bdc9b2999c19..146a9bc9b087dd6b703b2aa51f0431da970b2242 100644 (file)
@@ -18,9 +18,9 @@ public:
     switch (which) {
     case GRADIENT_ONLY:
     case OBJECTIVE_AND_GRADIENT:
-      return my_func(xy.GetLength(), xy.raw_data_const(), grad.raw_data(), my_data);
+      return my_func((unsigned) xy.GetLength(), xy.raw_data_const(), grad.raw_data(), my_data);
     case OBJECTIVE_ONLY:
-      return my_func(xy.GetLength(), xy.raw_data_const(), NULL, my_data);
+      return my_func((unsigned) xy.GetLength(), xy.raw_data_const(), NULL, my_data);
     }
     return 0.0;
   }