Redundant c_str()

This commit is contained in:
bofdahof
2024-12-24 13:07:56 +10:00
committed by Chris Hennes
parent 31825c28aa
commit 8ff4b1b018

View File

@@ -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<ParameterGrp> 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");