Addresses one more piece of feedback

Updates a call to ConvertToAlias to use PathView.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
This commit is contained in:
amzn-phist
2021-07-23 11:43:03 -05:00
parent d385f6ed99
commit ce2fc6c1e6
@@ -84,10 +84,10 @@ namespace AudioControls
m_foundLibraryPaths.begin(), m_foundLibraryPaths.end(),
[fileIO](AZStd::string& libraryPath) -> void
{
AZStd::optional<AZ::u64> newLength = fileIO->ConvertToAlias(libraryPath.data(), libraryPath.size());
if (newLength)
if (auto newPathOpt = fileIO->ConvertToAlias(AZ::IO::PathView{ libraryPath });
newPathOpt.has_value())
{
libraryPath.resize_no_construct(*newLength);
libraryPath = newPathOpt.value().Native();
}
AZStd::to_lower(libraryPath.begin(), libraryPath.end());
});