#include "xbt/replay.hpp"
#include "xbt/str.h"
+#include <boost/lexical_cast.hpp>
#include <cmath>
#include <limits>
#include <memory>
/* Helper functions */
static double parse_double(const std::string& string)
{
- return xbt_str_parse_double(string.c_str(), "not a double");
+ try {
+ return boost::lexical_cast<double>(string);
+ } catch (boost::bad_lexical_cast const&) {
+ throw std::invalid_argument("not a double: " + string);
+ }
}
template <typename T> static T parse_integer(const std::string& string)
void LocationAction::kernel(simgrid::xbt::ReplayAction&)
{
const LocationParser& args = get_args();
- smpi_trace_set_call_location(args.filename.c_str(), args.line, "");
+ smpi_trace_set_call_location(args.filename.c_str(), args.line, "replay_action");
}
void TestAction::kernel(simgrid::xbt::ReplayAction&)