forked from OSchip/llvm-project
Changed a function to static.
A temp object was being created to call StripOffFileName. This function is not dependent on class members so I am making it static. No regression on testsuite on Linux. llvm-svn: 233703
This commit is contained in:
parent
0b024619df
commit
0e1f11ffe0
|
@ -114,7 +114,7 @@ CMICmdCmdFileExecAndSymbols::Execute(void)
|
|||
const CMIUtilString &rStrKeyWkDir(rSessionInfo.m_constStrSharedDataKeyWkDir);
|
||||
if (!rSessionInfo.SharedDataRetrieve<CMIUtilString>(rStrKeyWkDir, strWkDir))
|
||||
{
|
||||
strWkDir = CMIUtilFileStd().StripOffFileName(strExeFilePath);
|
||||
strWkDir = CMIUtilFileStd::StripOffFileName(strExeFilePath);
|
||||
if (!rSessionInfo.SharedDataAdd<CMIUtilString>(rStrKeyWkDir, strWkDir))
|
||||
{
|
||||
SetError(CMIUtilString::Format(MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_ADD), m_cmdData.strMiCmd.c_str(), rStrKeyWkDir.c_str()));
|
||||
|
|
|
@ -216,7 +216,7 @@ CMICmnLogMediumFile::FileFormFileNamePath(void)
|
|||
CMIUtilString strPathName;
|
||||
if (CMIUtilSystem().GetLogFilesPath(strPathName))
|
||||
{
|
||||
const CMIUtilString strPath = CMIUtilFileStd().StripOffFileName(strPathName);
|
||||
const CMIUtilString strPath = CMIUtilFileStd::StripOffFileName(strPathName);
|
||||
|
||||
// ToDo: Review this LINUX log file quick fix so not hidden
|
||||
// AD:
|
||||
|
|
|
@ -254,7 +254,7 @@ CMIUtilFileStd::GetLineReturn(void) const
|
|||
// Throws: None.
|
||||
//--
|
||||
CMIUtilString
|
||||
CMIUtilFileStd::StripOffFileName(const CMIUtilString &vDirectoryPath) const
|
||||
CMIUtilFileStd::StripOffFileName(const CMIUtilString &vDirectoryPath)
|
||||
{
|
||||
const MIint nPos = vDirectoryPath.rfind('\\');
|
||||
MIint nPos2 = vDirectoryPath.rfind('/');
|
||||
|
|
|
@ -36,7 +36,7 @@ class CMIUtilFileStd : public CMICmnBase
|
|||
bool IsOk(void) const;
|
||||
bool IsFileExist(const CMIUtilString &vFileNamePath) const;
|
||||
const CMIUtilString &GetLineReturn(void) const;
|
||||
CMIUtilString StripOffFileName(const CMIUtilString &vDirectoryPath) const;
|
||||
static CMIUtilString StripOffFileName(const CMIUtilString &vDirectoryPath);
|
||||
|
||||
// Overridden:
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue