X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1847d1441271d076b3de449c8853031ea208ce8f..9dec3b0501e4464e246196d29dce6d03a6cbd2d7:/src/smpi/internals/smpi_utils.cpp diff --git a/src/smpi/internals/smpi_utils.cpp b/src/smpi/internals/smpi_utils.cpp index 0a043ae7f3..045dbcc5b0 100644 --- a/src/smpi/internals/smpi_utils.cpp +++ b/src/smpi/internals/smpi_utils.cpp @@ -1,18 +1,17 @@ -/* Copyright (c) 2016-2017. The SimGrid Team. +/* Copyright (c) 2016-2018. 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 "smpi/smpi_utils.hpp" -#include "xbt/sysdep.h" +#include "smpi_utils.hpp" #include "xbt/log.h" -#include "xbt/str.h" +#include "xbt/sysdep.h" #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_utils, smpi, "Logging specific to SMPI (utils)"); -std::vector parse_factor(const char *smpi_coef_string) +std::vector parse_factor(std::string smpi_coef_string) { std::vector smpi_factor; @@ -20,8 +19,7 @@ std::vector parse_factor(const char *smpi_coef_string) typedef boost::tokenizer> Tokenizer; boost::char_separator sep(";"); boost::char_separator factor_separator(":"); - std::string tmp_string(smpi_coef_string); - Tokenizer tokens(tmp_string, sep); + Tokenizer tokens(smpi_coef_string, sep); /** * Iterate over patterns like A:B:C:D;E:F;G:H @@ -35,7 +33,7 @@ std::vector parse_factor(const char *smpi_coef_string) Tokenizer factor_values(*token_iter, factor_separator); s_smpi_factor_t fact; if (factor_values.begin() == factor_values.end()) { - xbt_die("Malformed radical for smpi factor: '%s'", smpi_coef_string); + xbt_die("Malformed radical for smpi factor: '%s'", smpi_coef_string.c_str()); } unsigned int iteration = 0; for (Tokenizer::iterator factor_iter = factor_values.begin(); factor_iter != factor_values.end(); ++factor_iter) {