Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Explicit cast when loosing precision (teshsuite/).
[simgrid.git] / teshsuite / surf / lmm_usage / lmm_usage.cpp
index 9b8fe09..9ecc8e5 100644 (file)
@@ -5,7 +5,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "simgrid/msg.h"
+#include "simgrid/s4u/Engine.hpp"
 #include "src/kernel/lmm/maxmin.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "xbt/log.h"
@@ -147,7 +147,7 @@ static void test3()
   /* Link constraints and variables */
   for (int i = 0; i < 15; i++)
     for (int j = 0; j < 16; j++)
-      if (A[i][j])
+      if (A[i][j] != 0.0)
         Sys->expand(tmp_cnst[i], tmp_var[j], 1.0);
 
   Sys->solve();
@@ -167,7 +167,7 @@ static void test3()
 
 int main(int argc, char** argv)
 {
-  MSG_init(&argc, argv);
+  simgrid::s4u::Engine e(&argc, argv);
   XBT_INFO("***** Test 1");
   test1();