bool MC_compare_variable(
simgrid::mc::Variable const& a, simgrid::mc::Variable const& b)
{
- int cmp = strcmp(a.name.c_str(), b.name.c_str());
+ int cmp = a.name.compare(b.name);
if (cmp < 0)
return true;
else if (cmp > 0)
while (start <= end) {
unsigned int cursor = (start + end) / 2;
simgrid::mc::Variable* current_var = &info->global_variables[cursor];
- int cmp = strcmp(current_var->name.c_str(), name);
+ int cmp = current_var->name.compare(name);
if (cmp == 0) {
info->global_variables.erase(
info->global_variables.begin() + cursor);
int cursor = (start + end) / 2;
simgrid::mc::Variable* current_var = &scope->variables[cursor];
- int compare = strcmp(current_var->name.c_str(), var_name);
+ int compare = current_var->name.compare(var_name);
if (compare == 0) {
// Variable found, remove it:
scope->variables.erase(scope->variables.begin() + cursor);