Implemented C++23 deleted nullptr_t constructor/assignment for AZStd string classes (#4158)
* Added string and string_view class constructor overloads which is deleted that prevents initializing them from a nullptr or an integer type Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Fixed locations where string and string_view were initialized with nullptr Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Fix IArchive::IsInstalledToHDD signature Updated calls to ConvertAbsolutePathToAliasedPath to use an list initialization instead of nullptr Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f1f35a0ba8
commit
58c227ceb1
@@ -94,7 +94,7 @@ namespace UnitTest
|
||||
fileIo->Remove(testArchivePath.c_str());
|
||||
|
||||
// ------------ BASIC TEST: Create and read Empty Archive ------------
|
||||
AZStd::intrusive_ptr<AZ::IO::INestedArchive> pArchive = archive->OpenArchive(testArchivePath.c_str(), nullptr, AZ::IO::INestedArchive::FLAGS_CREATE_NEW);
|
||||
AZStd::intrusive_ptr<AZ::IO::INestedArchive> pArchive = archive->OpenArchive(testArchivePath.c_str(), {}, AZ::IO::INestedArchive::FLAGS_CREATE_NEW);
|
||||
EXPECT_NE(nullptr, pArchive);
|
||||
pArchive.reset();
|
||||
EXPECT_TRUE(IsPackValid(testArchivePath.c_str()));
|
||||
@@ -122,7 +122,7 @@ namespace UnitTest
|
||||
checkSums[pos] = static_cast<uint8_t>(pos % 256);
|
||||
}
|
||||
|
||||
auto pArchive = archive->OpenArchive(testArchivePath.c_str(), nullptr, AZ::IO::INestedArchive::FLAGS_CREATE_NEW);
|
||||
auto pArchive = archive->OpenArchive(testArchivePath.c_str(), {}, AZ::IO::INestedArchive::FLAGS_CREATE_NEW);
|
||||
EXPECT_NE(nullptr, pArchive);
|
||||
|
||||
// the strategy here is to find errors related to file sizes, alignment, overwrites
|
||||
@@ -143,7 +143,7 @@ namespace UnitTest
|
||||
|
||||
|
||||
// --------------------------------------------- read it back and verify
|
||||
pArchive = archive->OpenArchive(testArchivePath.c_str(), nullptr, openFlags);
|
||||
pArchive = archive->OpenArchive(testArchivePath.c_str(), {}, openFlags);
|
||||
EXPECT_NE(nullptr, pArchive);
|
||||
|
||||
for (int j = 0; j < iterations; ++j)
|
||||
@@ -241,7 +241,7 @@ namespace UnitTest
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
// read it back and verify
|
||||
pArchive = archive->OpenArchive(testArchivePath.c_str(), nullptr, openFlags);
|
||||
pArchive = archive->OpenArchive(testArchivePath.c_str(), {}, openFlags);
|
||||
EXPECT_NE(nullptr, pArchive);
|
||||
|
||||
for (int j = 0; j < iterations; ++j)
|
||||
@@ -298,7 +298,7 @@ namespace UnitTest
|
||||
}
|
||||
|
||||
// first, reset the pack to the original state:
|
||||
auto pArchive = archive->OpenArchive(testArchivePath.c_str(), nullptr, AZ::IO::INestedArchive::FLAGS_CREATE_NEW);
|
||||
auto pArchive = archive->OpenArchive(testArchivePath.c_str(), {}, AZ::IO::INestedArchive::FLAGS_CREATE_NEW);
|
||||
EXPECT_NE(nullptr, pArchive);
|
||||
|
||||
for (int j = 0; j < iterations; ++j)
|
||||
@@ -382,7 +382,7 @@ namespace UnitTest
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
// read it back and verify
|
||||
pArchive = archive->OpenArchive(testArchivePath.c_str(), nullptr, openFlags);
|
||||
pArchive = archive->OpenArchive(testArchivePath.c_str(), {}, openFlags);
|
||||
EXPECT_NE(nullptr, pArchive);
|
||||
|
||||
writeCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user