diff --git a/Code/Editor/CryEditPy.cpp b/Code/Editor/CryEditPy.cpp index 7e07d5553d..e4c300d744 100644 --- a/Code/Editor/CryEditPy.cpp +++ b/Code/Editor/CryEditPy.cpp @@ -210,7 +210,7 @@ namespace const char* PyGetCurrentLevelName() { // Using static member to capture temporary data - static AZStd::fixed_string tempLevelName; + static AZ::IO::FixedMaxPathString tempLevelName; tempLevelName = GetIEditor()->GetGameEngine()->GetLevelName().toUtf8().data(); return tempLevelName.c_str(); } @@ -218,7 +218,7 @@ namespace const char* PyGetCurrentLevelPath() { // Using static member to capture temporary data - static AZStd::fixed_string tempLevelPath; + static AZ::IO::FixedMaxPathString tempLevelPath; tempLevelPath = GetIEditor()->GetGameEngine()->GetLevelPath().toUtf8().data(); return tempLevelPath.c_str(); } diff --git a/Code/Editor/Util/PathUtil.cpp b/Code/Editor/Util/PathUtil.cpp index 3ca4b6222c..e8a5f0f74a 100644 --- a/Code/Editor/Util/PathUtil.cpp +++ b/Code/Editor/Util/PathUtil.cpp @@ -246,7 +246,7 @@ namespace Path AZStd::string GetEditingGameDataFolder() { // Define here the mod name - static AZStd::fixed_string s_currentModName; + static AZ::IO::FixedMaxPathString s_currentModName; if (s_currentModName.empty()) { diff --git a/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp b/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp index 79d9f8c302..41e0ac3f09 100644 --- a/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp +++ b/Code/Framework/AzCore/Tests/IO/Path/PathTests.cpp @@ -418,7 +418,7 @@ namespace UnitTest // Check each operator/= and append overload for success { - AZStd::fixed_string pathString{ "foo" }; + AZ::IO::FixedMaxPathString pathString{ "foo" }; AZ::IO::FixedMaxPath testPath('/'); testPath /= AZ::IO::PathView(pathString); testPath /= pathString; @@ -428,7 +428,7 @@ namespace UnitTest EXPECT_STREQ("foo/foo/foo/foo/f", testPath.c_str()); } { - AZStd::fixed_string pathString{ "foo" }; + AZ::IO::FixedMaxPathString pathString{ "foo" }; AZ::IO::FixedMaxPath testPath('/'); testPath.Append(AZ::IO::PathView(pathString)); testPath.Append(pathString); diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp index 8c24250396..a3d2103650 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp @@ -94,7 +94,7 @@ namespace AZ::IO::ArchiveInternal } return convertedPath; } - return AZStd::make_optional>(sourcePath); + return AZStd::make_optional(sourcePath); } struct CCachedFileRawData @@ -614,7 +614,7 @@ namespace AZ::IO const char* Archive::AdjustFileName(AZStd::string_view src, char* dst, size_t dstSize, uint32_t, bool) { - AZStd::fixed_string srcPath{ src }; + AZ::IO::FixedMaxPathString srcPath{ src }; return AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(srcPath.c_str(), dst, dstSize) ? dst : nullptr; } @@ -2407,14 +2407,14 @@ namespace AZ::IO ////////////////////////////////////////////////////////////////////////// bool Archive::RemoveFile(AZStd::string_view pName) { - AZStd::fixed_string szFullPath{ pName }; + AZ::IO::FixedMaxPathString szFullPath{ pName }; return AZ::IO::FileIOBase::GetDirectInstance()->Remove(szFullPath.c_str()) == AZ::IO::ResultCode::Success; } ////////////////////////////////////////////////////////////////////////// bool Archive::RemoveDir(AZStd::string_view pName) { - AZStd::fixed_string szFullPath{ pName }; + AZ::IO::FixedMaxPathString szFullPath{ pName }; if (AZ::IO::FileIOBase::GetDirectInstance()->IsDirectory(szFullPath.c_str())) { diff --git a/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h b/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h index 3de63169b2..a23a213f05 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h @@ -30,7 +30,7 @@ namespace AZ::IO struct INestedArchive; struct IArchive; - using PathString = AZStd::fixed_string; + using PathString = AZ::IO::FixedMaxPathString; using StackString = AZStd::fixed_string<512>; struct MemoryBlock; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.cpp index 16548c6a39..dc1d4aa864 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/NestedArchive.cpp @@ -41,7 +41,7 @@ namespace AZ::IO return ZipDir::ZD_ERROR_INVALID_CALL; } - AZStd::fixed_string fullPath = AdjustPath(szRelativePath); + AZ::IO::FixedMaxPathString fullPath = AdjustPath(szRelativePath); if (fullPath.empty()) { return ZipDir::ZD_ERROR_INVALID_PATH; @@ -63,7 +63,7 @@ namespace AZ::IO return ZipDir::ZD_ERROR_INVALID_CALL; } - AZStd::fixed_string fullPath = AdjustPath(szRelativePath); + AZ::IO::FixedMaxPathString fullPath = AdjustPath(szRelativePath); if (fullPath.empty()) { return ZipDir::ZD_ERROR_INVALID_PATH; @@ -81,7 +81,7 @@ namespace AZ::IO return ZipDir::ZD_ERROR_INVALID_CALL; } - AZStd::fixed_string fullPath = AdjustPath(szRelativePath); + AZ::IO::FixedMaxPathString fullPath = AdjustPath(szRelativePath); if (fullPath.empty()) { return ZipDir::ZD_ERROR_INVALID_PATH; @@ -105,7 +105,7 @@ namespace AZ::IO return ZipDir::ZD_ERROR_INVALID_CALL; } - AZStd::fixed_string fullPath = AdjustPath(szRelativePath); + AZ::IO::FixedMaxPathString fullPath = AdjustPath(szRelativePath); if (fullPath.empty()) { return ZipDir::ZD_ERROR_INVALID_PATH; @@ -122,7 +122,7 @@ namespace AZ::IO return ZipDir::ZD_ERROR_INVALID_CALL; } - AZStd::fixed_string fullPath = AdjustPath(szRelativePath); + AZ::IO::FixedMaxPathString fullPath = AdjustPath(szRelativePath); if (fullPath.empty()) { return ZipDir::ZD_ERROR_INVALID_PATH; @@ -141,7 +141,7 @@ namespace AZ::IO return ZipDir::ZD_ERROR_INVALID_CALL; } - AZStd::fixed_string fullPath = AdjustPath(szRelativePath); + AZ::IO::FixedMaxPathString fullPath = AdjustPath(szRelativePath); if (fullPath.empty()) { return ZipDir::ZD_ERROR_INVALID_PATH; @@ -152,7 +152,7 @@ namespace AZ::IO // finds the file; you don't have to close the returned handle auto NestedArchive::FindFile(AZStd::string_view szRelativePath) -> Handle { - AZStd::fixed_string fullPath = AdjustPath(szRelativePath); + AZ::IO::FixedMaxPathString fullPath = AdjustPath(szRelativePath); if (fullPath.empty()) { return nullptr; @@ -249,7 +249,7 @@ namespace AZ::IO if (m_nFlags & FLAGS_RELATIVE_PATHS_ONLY) { - return AZStd::fixed_string{ szRelativePath }; + return AZ::IO::FixedMaxPathString{ szRelativePath }; } if ((szRelativePath.size() > 1 && szRelativePath[1] == ':') || (m_nFlags & FLAGS_ABSOLUTE_PATHS)) diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirStructures.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirStructures.cpp index 034d2f4029..445bba63f4 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ZipDirStructures.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ZipDirStructures.cpp @@ -440,7 +440,7 @@ namespace AZ::IO::ZipDir azstrcpy(volume, AZ_ARRAY_SIZE(volume), filename); } - AZStd::fixed_string drive{ AZ::IO::PathView(volume).RootName().Native() }; + AZ::IO::FixedMaxPathString drive{ AZ::IO::PathView(volume).RootName().Native() }; if (drive.empty()) { return false; diff --git a/Code/Tools/AssetProcessor/native/ui/ProductAssetTreeModel.cpp b/Code/Tools/AssetProcessor/native/ui/ProductAssetTreeModel.cpp index 6b5fa191e8..0574f00961 100644 --- a/Code/Tools/AssetProcessor/native/ui/ProductAssetTreeModel.cpp +++ b/Code/Tools/AssetProcessor/native/ui/ProductAssetTreeModel.cpp @@ -195,7 +195,7 @@ namespace AssetProcessor AZ::IO::Path currentFullFolderPath; const AZ::IO::PathView filename = productNamePath.Filename(); const AZ::IO::PathView fullPathWithoutFilename = productNamePath.RemoveFilename(); - AZStd::fixed_string currentPath; + AZ::IO::FixedMaxPathString currentPath; for (auto pathIt = fullPathWithoutFilename.begin(); pathIt != fullPathWithoutFilename.end(); ++pathIt) { currentPath = pathIt->FixedMaxPathString(); @@ -236,7 +236,7 @@ namespace AssetProcessor } AZStd::shared_ptr productItemData = - ProductAssetTreeItemData::MakeShared(&product, product.m_productName, AZStd::fixed_string(filename.Native()).c_str(), false, sourceId); + ProductAssetTreeItemData::MakeShared(&product, product.m_productName, AZ::IO::FixedMaxPathString(filename.Native()).c_str(), false, sourceId); m_productToTreeItem[product.m_productName] = parentItem->CreateChild(productItemData); m_productIdToTreeItem[product.m_productID] = m_productToTreeItem[product.m_productName]; diff --git a/Code/Tools/AssetProcessor/native/ui/SourceAssetTreeModel.cpp b/Code/Tools/AssetProcessor/native/ui/SourceAssetTreeModel.cpp index 6a5e53eb75..1fcdd62cf7 100644 --- a/Code/Tools/AssetProcessor/native/ui/SourceAssetTreeModel.cpp +++ b/Code/Tools/AssetProcessor/native/ui/SourceAssetTreeModel.cpp @@ -94,7 +94,7 @@ namespace AssetProcessor AZ::IO::Path currentFullFolderPath(AZ::IO::PosixPathSeparator); const AZ::IO::FixedMaxPath filename = fullPath.Filename(); fullPath.RemoveFilename(); - AZStd::fixed_string currentPath; + AZ::IO::FixedMaxPathString currentPath; for (auto pathIt = fullPath.begin(); pathIt != fullPath.end(); ++pathIt) { currentPath = pathIt->FixedMaxPathString(); @@ -125,7 +125,7 @@ namespace AssetProcessor } m_sourceToTreeItem[source.m_sourceName] = - parentItem->CreateChild(SourceAssetTreeItemData::MakeShared(&source, &scanFolder, source.m_sourceName, AZStd::fixed_string(filename.Native()).c_str(), false)); + parentItem->CreateChild(SourceAssetTreeItemData::MakeShared(&source, &scanFolder, source.m_sourceName, AZ::IO::FixedMaxPathString(filename.Native()).c_str(), false)); m_sourceIdToTreeItem[source.m_sourceID] = m_sourceToTreeItem[source.m_sourceName]; if (!modelIsResetting) {