1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

int2String() -> std::to_string()

This commit is contained in:
Eelco Dolstra 2015-10-29 13:26:55 +01:00
parent 71039becd1
commit 5c28943e8f
9 changed files with 17 additions and 24 deletions

View file

@ -243,7 +243,7 @@ static void parse(ParseSink & sink, Source & source, const Path & path)
if (i != names.end()) {
printMsg(lvlDebug, format("case collision between %1% and %2%") % i->first % name);
name += caseHackSuffix;
name += int2String(++i->second);
name += std::to_string(++i->second);
} else
names[name] = 0;
}

View file

@ -453,7 +453,7 @@ Nest::~Nest()
static string escVerbosity(Verbosity level)
{
return int2String((int) level);
return std::to_string((int) level);
}

View file

@ -356,13 +356,6 @@ template<class N> bool string2Int(const string & s, N & n)
return str && str.get() == EOF;
}
template<class N> string int2String(N n)
{
std::ostringstream str;
str << n;
return str.str();
}
/* Return true iff `s' ends in `suffix'. */
bool hasSuffix(const string & s, const string & suffix);