diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-06-12 12:30:04 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-06-12 12:30:04 +0200 |
commit | 455a4f2176a5cfbe325e1e40cea20dd3e466b64c (patch) | |
tree | 7a84d0f768ee375ea9f648bbbdeac7a4906f13fb /src/Platform/PlatformTest.cpp | |
parent | bf9f3ec4f0a987ae1591ab5466f6eee599203c85 (diff) | |
download | VeraCrypt-455a4f2176a5cfbe325e1e40cea20dd3e466b64c.tar.gz VeraCrypt-455a4f2176a5cfbe325e1e40cea20dd3e466b64c.zip |
Avoid conflict with C++17 features std::byte by using uint8 type instead of byte
Diffstat (limited to 'src/Platform/PlatformTest.cpp')
-rw-r--r-- | src/Platform/PlatformTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Platform/PlatformTest.cpp b/src/Platform/PlatformTest.cpp index 7362d6bf..9a3faae2 100644 --- a/src/Platform/PlatformTest.cpp +++ b/src/Platform/PlatformTest.cpp @@ -76,7 +76,7 @@ namespace VeraCrypt Buffer buffer (10); for (size_t i = 0; i < buffer.Size(); i++) - buffer[i] = (byte) i; + buffer[i] = (uint8) i; ser.Serialize ("int32", i32); ser.Serialize ("int64", i64); @@ -141,7 +141,7 @@ namespace VeraCrypt Buffer dbuffer (10); ser.Deserialize ("buffer", buffer); for (size_t i = 0; i < buffer.Size(); i++) - if (buffer[i] != (byte) i) + if (buffer[i] != (uint8) i) throw TestFailed (SRC_POS); shared_ptr <ExecutedProcessFailed> dex = Serializable::DeserializeNew <ExecutedProcessFailed> (stream); @@ -238,7 +238,7 @@ namespace VeraCrypt bool PlatformTest::TestAll () { // Integer types - if (sizeof (byte) != 1 || sizeof (int8) != 1 || sizeof (__int8) != 1) throw TestFailed (SRC_POS); + if (sizeof (uint8) != 1 || sizeof (int8) != 1 || sizeof (__int8) != 1) throw TestFailed (SRC_POS); if (sizeof (uint16) != 2 || sizeof (int16) != 2 || sizeof (__int16) != 2) throw TestFailed (SRC_POS); if (sizeof (uint32) != 4 || sizeof (int32) != 4 || sizeof (__int32) != 4) throw TestFailed (SRC_POS); if (sizeof (uint64) != 8 || sizeof (int64) != 8) throw TestFailed (SRC_POS); |