Skip to content

Commit

Permalink
pkgadd.cpp: itos() -> std::to_string()
Browse files Browse the repository at this point in the history
  • Loading branch information
sighook committed Jan 14, 2024
1 parent 313bada commit 1abb6d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pkgadd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pkgadd::read_config(const string& file)
if (!line.empty() && line[0] != '#')
{
if (line.length() >= PKGADD_CONF_MAXLINE)
throw runtime_error(filename + ":" + itos(linecount) +
throw runtime_error(filename + ":" + std::to_string(linecount) +
": line too long, aborting");

char event[PKGADD_CONF_MAXLINE];
Expand All @@ -173,7 +173,7 @@ pkgadd::read_config(const string& file)
if (sscanf(line.c_str(), "%s %s %s %s",
event, pattern, action, dummy) != 3)
{
throw runtime_error(filename + ":" + itos(linecount) +
throw runtime_error(filename + ":" + std::to_string(linecount) +
": wrong number of arguments, aborting");
}

Expand All @@ -193,7 +193,7 @@ pkgadd::read_config(const string& file)
}
else
{
throw runtime_error(filename + ":" + itos(linecount) +
throw runtime_error(filename + ":" + std::to_string(linecount) +
": '" + string(action) +
"' unknown action, should be YES or NO, aborting");
}
Expand All @@ -202,7 +202,7 @@ pkgadd::read_config(const string& file)
}
else
{
throw runtime_error(filename + ":" + itos(linecount) + ": '" +
throw runtime_error(filename + ":" + std::to_string(linecount) + ": '" +
string(event) + "' unknown event, aborting");
}
}
Expand Down

0 comments on commit 1abb6d5

Please sign in to comment.