More string fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -57,7 +57,7 @@ bool CConsoleBatchFile::ExecuteConfigFile(const char* sFilename)
|
||||
Init();
|
||||
}
|
||||
|
||||
string filename;
|
||||
AZStd::string filename;
|
||||
|
||||
if (sFilename[0] != '@') // console config files are actually by default in @root@ instead of @assets@
|
||||
{
|
||||
@@ -78,7 +78,7 @@ bool CConsoleBatchFile::ExecuteConfigFile(const char* sFilename)
|
||||
filename = sFilename;
|
||||
}
|
||||
|
||||
if (strlen(PathUtil::GetExt(filename)) == 0)
|
||||
if (strlen(PathUtil::GetExt(filename.c_str())) == 0)
|
||||
{
|
||||
filename = PathUtil::ReplaceExtension(filename, "cfg");
|
||||
}
|
||||
@@ -88,20 +88,20 @@ bool CConsoleBatchFile::ExecuteConfigFile(const char* sFilename)
|
||||
|
||||
{
|
||||
const char* szLog = "Executing console batch file (try game,config,root):";
|
||||
string filenameLog;
|
||||
string sfn = PathUtil::GetFile(filename);
|
||||
AZStd::string filenameLog;
|
||||
AZStd::string sfn = PathUtil::GetFile(filename);
|
||||
|
||||
if (file.Open(filename, "rb", AZ::IO::IArchive::FOPEN_HINT_QUIET | AZ::IO::IArchive::FOPEN_ONDISK))
|
||||
if (file.Open(filename.c_str(), "rb", AZ::IO::IArchive::FOPEN_HINT_QUIET | AZ::IO::IArchive::FOPEN_ONDISK))
|
||||
{
|
||||
filenameLog = string("game/") + sfn;
|
||||
filenameLog = AZStd::string("game/") + sfn;
|
||||
}
|
||||
else if (file.Open(string("config/") + sfn, "rb", AZ::IO::IArchive::FOPEN_HINT_QUIET | AZ::IO::IArchive::FOPEN_ONDISK))
|
||||
else if (file.Open((AZStd::string("config/") + sfn).c_str(), "rb", AZ::IO::IArchive::FOPEN_HINT_QUIET | AZ::IO::IArchive::FOPEN_ONDISK))
|
||||
{
|
||||
filenameLog = string("game/config/") + sfn;
|
||||
filenameLog = AZStd::string("game/config/") + sfn;
|
||||
}
|
||||
else if (file.Open(string("./") + sfn, "rb", AZ::IO::IArchive::FOPEN_HINT_QUIET | AZ::IO::IArchive::FOPEN_ONDISK))
|
||||
else if (file.Open((AZStd::string("./") + sfn).c_str(), "rb", AZ::IO::IArchive::FOPEN_HINT_QUIET | AZ::IO::IArchive::FOPEN_ONDISK))
|
||||
{
|
||||
filenameLog = string("./") + sfn;
|
||||
filenameLog = AZStd::string("./") + sfn;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -142,11 +142,11 @@ bool CConsoleBatchFile::ExecuteConfigFile(const char* sFilename)
|
||||
str++;
|
||||
}
|
||||
|
||||
string strLine = s;
|
||||
AZStd::string strLine = s;
|
||||
|
||||
|
||||
//trim all whitespace characters at the beginning and the end of the current line and store its size
|
||||
strLine.Trim();
|
||||
AZ::StringFunc::TrimWhiteSpace(strLine, true, true);
|
||||
size_t strLineSize = strLine.size();
|
||||
|
||||
//skip comments, comments start with ";" or "--" but may have preceding whitespace characters
|
||||
@@ -168,7 +168,7 @@ bool CConsoleBatchFile::ExecuteConfigFile(const char* sFilename)
|
||||
}
|
||||
|
||||
{
|
||||
m_pConsole->ExecuteString(strLine);
|
||||
m_pConsole->ExecuteString(strLine.c_str());
|
||||
}
|
||||
}
|
||||
// See above
|
||||
|
||||
Reference in New Issue
Block a user