From 1abb6d5374ea4b01034daa5a340fe07c3deaeaaa Mon Sep 17 00:00:00 2001 From: Alexandr Savca Date: Sun, 14 Jan 2024 23:19:55 +0200 Subject: [PATCH] pkgadd.cpp: itos() -> std::to_string() --- src/pkgadd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pkgadd.cpp b/src/pkgadd.cpp index 5ce54d9..64a0265 100644 --- a/src/pkgadd.cpp +++ b/src/pkgadd.cpp @@ -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]; @@ -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"); } @@ -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"); } @@ -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"); } }