Redundant c_str()
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user