mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
* Refactoring.
This commit is contained in:
parent
4b66cebe7b
commit
8a6080eb14
3 changed files with 11 additions and 10 deletions
|
@ -360,10 +360,7 @@ Nest::~Nest()
|
|||
|
||||
static string escVerbosity(Verbosity level)
|
||||
{
|
||||
int l = (int) level;
|
||||
ostringstream st;
|
||||
st << l;
|
||||
return st.str();
|
||||
return int2String((int) level);
|
||||
}
|
||||
|
||||
|
||||
|
@ -829,6 +826,14 @@ bool statusOk(int status)
|
|||
}
|
||||
|
||||
|
||||
string int2String(int n)
|
||||
{
|
||||
ostringstream str;
|
||||
str << n;
|
||||
return str.str();
|
||||
}
|
||||
|
||||
|
||||
bool string2Int(const string & s, int & n)
|
||||
{
|
||||
istringstream str(s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue