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:
Hafiz Abid Qadeer 2015-03-31 16:30:29 +00:00
parent 0b024619df
commit 0e1f11ffe0
4 changed files with 4 additions and 4 deletions

View File

@ -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()));

View File

@ -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:

View File

@ -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('/');

View File

@ -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: