Updated string to string_view per PR feedback.

Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
Chris Galvan
2021-08-06 09:23:33 -05:00
parent 3986a11396
commit eeb1b68a72
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1900,12 +1900,12 @@ IFileUtil::ECopyTreeResult CFileUtil::MoveTree(const QString& strSourceDirecto
return eCopyResult;
}
void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, const AZStd::string& fullGamePath)
void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath)
{
PopulateQMenu(caller, menu, fullGamePath, nullptr);
}
void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, const AZStd::string& fullGamePath, bool* isSelected)
void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath, bool* isSelected)
{
// Normalize the full path so we get consistent separators
AZStd::string fullFilePath(fullGamePath);
+2 -2
View File
@@ -134,7 +134,7 @@ public:
// THIS FUNCTION IS NOT DESIGNED FOR MULTI-THREADED USAGE
static IFileUtil::ECopyTreeResult MoveTree(const QString& strSourceDirectory, const QString& strTargetDirectory, bool boRecurse = true, bool boConfirmOverwrite = false);
static void PopulateQMenu(QWidget* caller, QMenu* menu, const AZStd::string& fullGamePath);
static void PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath);
static void GatherAssetFilenamesFromLevel(std::set<QString>& rOutFilenames, bool bMakeLowerCase = false, bool bMakeUnixPath = false);
@@ -161,7 +161,7 @@ private:
static bool s_multiFileDlgPref[IFileUtil::EFILE_TYPE_LAST];
// Keep this variant of this method private! pIsSelected is captured in a lambda, and so requires menu use exec() and never use show()
static void PopulateQMenu(QWidget* caller, QMenu* menu, const AZStd::string& fullGamePath, bool* pIsSelected);
static void PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath, bool* pIsSelected);
static bool ExtractDccFilenameFromAssetDatabase(const QString& assetFilename, QString& dccFilename);
static bool ExtractDccFilenameUsingNamingConventions(const QString& assetFilename, QString& dccFilename);