Redundant c_str()
This commit is contained in:
@@ -1163,7 +1163,7 @@ std::string Application::getResourceDir()
|
|||||||
{
|
{
|
||||||
#ifdef RESOURCEDIR
|
#ifdef RESOURCEDIR
|
||||||
// #6892: Conda may inject null characters => remove them
|
// #6892: Conda may inject null characters => remove them
|
||||||
std::string path = std::string(RESOURCEDIR).c_str();
|
auto path = std::string(RESOURCEDIR);
|
||||||
path += PATHSEP;
|
path += PATHSEP;
|
||||||
QDir dir(QString::fromStdString(path));
|
QDir dir(QString::fromStdString(path));
|
||||||
if (dir.isAbsolute())
|
if (dir.isAbsolute())
|
||||||
@@ -1178,7 +1178,7 @@ std::string Application::getLibraryDir()
|
|||||||
{
|
{
|
||||||
#ifdef LIBRARYDIR
|
#ifdef LIBRARYDIR
|
||||||
// #6892: Conda may inject null characters => remove them
|
// #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));
|
QDir dir(QString::fromStdString(path));
|
||||||
if (dir.isAbsolute())
|
if (dir.isAbsolute())
|
||||||
return path;
|
return path;
|
||||||
@@ -1192,7 +1192,7 @@ std::string Application::getHelpDir()
|
|||||||
{
|
{
|
||||||
#ifdef DOCDIR
|
#ifdef DOCDIR
|
||||||
// #6892: Conda may inject null characters => remove them
|
// #6892: Conda may inject null characters => remove them
|
||||||
std::string path = std::string(DOCDIR).c_str();
|
auto path = std::string(DOCDIR);
|
||||||
path += PATHSEP;
|
path += PATHSEP;
|
||||||
QDir dir(QString::fromStdString(path));
|
QDir dir(QString::fromStdString(path));
|
||||||
if (dir.isAbsolute())
|
if (dir.isAbsolute())
|
||||||
@@ -1311,7 +1311,7 @@ Base::Reference<ParameterGrp> Application::GetParameterGroupByPath(const char*
|
|||||||
cName.erase(0,pos+1);
|
cName.erase(0,pos+1);
|
||||||
|
|
||||||
// test if name is valid
|
// test if name is valid
|
||||||
auto It = mpcPramManager.find(cTemp.c_str());
|
auto It = mpcPramManager.find(cTemp);
|
||||||
if (It == mpcPramManager.end())
|
if (It == mpcPramManager.end())
|
||||||
throw Base::ValueError("Application::GetParameterGroupByPath() unknown parameter set name specified");
|
throw Base::ValueError("Application::GetParameterGroupByPath() unknown parameter set name specified");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user