From ab265991c27df7accc21666c7bf93b048c5ccc23 Mon Sep 17 00:00:00 2001 From: Pavel Solodovnikov <hellyeahdominate@gmail.com> Date: Tue, 30 May 2017 23:22:01 +0300 Subject: [PATCH] Remove second arg: npos in substr usages --- SystemInformation.cxx | 2 +- SystemTools.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SystemInformation.cxx b/SystemInformation.cxx index 21fe135..773abee 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -1331,7 +1331,7 @@ std::string SymbolProperties::GetFileName(const std::string& path) const if (!this->ReportPath) { size_t at = file.rfind("/"); if (at != std::string::npos) { - file = file.substr(at + 1, std::string::npos); + file = file.substr(at + 1); } } return file; diff --git a/SystemTools.cxx b/SystemTools.cxx index c75dd08..c5bbd41 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -1721,7 +1721,7 @@ std::string SystemTools::CropString(const std::string& s, size_t max_len) size_t middle = max_len / 2; n += s.substr(0, middle); - n += s.substr(s.size() - (max_len - middle), std::string::npos); + n += s.substr(s.size() - (max_len - middle)); if (max_len > 2) { n[middle] = '.'; -- GitLab