From ce2fc6c1e6cfe31ac6ed2264c0930574c3305ebe Mon Sep 17 00:00:00 2001 From: amzn-phist <52085794+amzn-phist@users.noreply.github.com> Date: Fri, 23 Jul 2021 11:43:03 -0500 Subject: [PATCH] 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> --- Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp index 973da60c90..91f9aa5138 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsWriter.cpp @@ -84,10 +84,10 @@ namespace AudioControls m_foundLibraryPaths.begin(), m_foundLibraryPaths.end(), [fileIO](AZStd::string& libraryPath) -> void { - AZStd::optional 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()); });