From 8ff4b1b0183138e7fbab8871b5992cf00ddab00a Mon Sep 17 00:00:00 2001 From: bofdahof <172177156+bofdahof@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:07:56 +1000 Subject: [PATCH] Redundant c_str() --- src/App/Application.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index ef114ad7d9..eae485173c 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -1163,7 +1163,7 @@ std::string Application::getResourceDir() { #ifdef RESOURCEDIR // #6892: Conda may inject null characters => remove them - std::string path = std::string(RESOURCEDIR).c_str(); + auto path = std::string(RESOURCEDIR); path += PATHSEP; QDir dir(QString::fromStdString(path)); if (dir.isAbsolute()) @@ -1178,7 +1178,7 @@ std::string Application::getLibraryDir() { #ifdef LIBRARYDIR // #6892: Conda may inject null characters => remove them - std::string path = std::string(LIBRARYDIR).c_str(); + auto path = std::string(LIBRARYDIR); QDir dir(QString::fromStdString(path)); if (dir.isAbsolute()) return path; @@ -1192,7 +1192,7 @@ std::string Application::getHelpDir() { #ifdef DOCDIR // #6892: Conda may inject null characters => remove them - std::string path = std::string(DOCDIR).c_str(); + auto path = std::string(DOCDIR); path += PATHSEP; QDir dir(QString::fromStdString(path)); if (dir.isAbsolute()) @@ -1311,7 +1311,7 @@ Base::Reference Application::GetParameterGroupByPath(const char* cName.erase(0,pos+1); // test if name is valid - auto It = mpcPramManager.find(cTemp.c_str()); + auto It = mpcPramManager.find(cTemp); if (It == mpcPramManager.end()) throw Base::ValueError("Application::GetParameterGroupByPath() unknown parameter set name specified");