Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / teshsuite / mc / dwarf-expression / dwarf-expression.cpp
index febdea1..a317517 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved.          */
 
 /* 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 <array>
 #include <cassert>
 #include <cstdlib>
-#include <cstring>
-#include <random>
+#include <limits>
+#include <xbt/random.hpp>
 
-static std::default_random_engine rnd_engine;
+static uintptr_t rnd_engine()
+{
+  return simgrid::xbt::random::uniform_int(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
+}
 
 static uintptr_t eval_binary_operation(simgrid::dwarf::ExpressionContext const& state, uint8_t op, uintptr_t a,
                                        uintptr_t b)