From 63c2e32e207d31ecadd9022e1d7cd705c9febac8 Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Sat, 15 Sep 2018 15:21:06 +0200 Subject: Port #4182 from Citra: "Prefix all size_t with std::" --- src/tests/core/arm/arm_test_common.cpp | 9 +++++---- src/tests/core/arm/arm_test_common.h | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/tests/core/arm') diff --git a/src/tests/core/arm/arm_test_common.cpp b/src/tests/core/arm/arm_test_common.cpp index 038d57b3a..7c69fc26e 100644 --- a/src/tests/core/arm/arm_test_common.cpp +++ b/src/tests/core/arm/arm_test_common.cpp @@ -87,11 +87,11 @@ boost::optional TestEnvironment::TestMemory::Read64(VAddr addr) { return *Read32(addr) | static_cast(*Read32(addr + 4)) << 32; } -bool TestEnvironment::TestMemory::ReadBlock(VAddr src_addr, void* dest_buffer, size_t size) { +bool TestEnvironment::TestMemory::ReadBlock(VAddr src_addr, void* dest_buffer, std::size_t size) { VAddr addr = src_addr; u8* data = static_cast(dest_buffer); - for (size_t i = 0; i < size; i++, addr++, data++) { + for (std::size_t i = 0; i < size; i++, addr++, data++) { *data = *Read8(addr); } @@ -126,11 +126,12 @@ bool TestEnvironment::TestMemory::Write64(VAddr addr, u64 data) { return true; } -bool TestEnvironment::TestMemory::WriteBlock(VAddr dest_addr, const void* src_buffer, size_t size) { +bool TestEnvironment::TestMemory::WriteBlock(VAddr dest_addr, const void* src_buffer, + std::size_t size) { VAddr addr = dest_addr; const u8* data = static_cast(src_buffer); - for (size_t i = 0; i < size; i++, addr++, data++) { + for (std::size_t i = 0; i < size; i++, addr++, data++) { env->write_records.emplace_back(8, addr, *data); if (env->mutable_memory) env->SetMemory8(addr, *data); diff --git a/src/tests/core/arm/arm_test_common.h b/src/tests/core/arm/arm_test_common.h index e4b6df194..5de8dab4e 100644 --- a/src/tests/core/arm/arm_test_common.h +++ b/src/tests/core/arm/arm_test_common.h @@ -19,8 +19,8 @@ struct PageTable; namespace ArmTests { struct WriteRecord { - WriteRecord(size_t size, VAddr addr, u64 data) : size(size), addr(addr), data(data) {} - size_t size; + WriteRecord(std::size_t size, VAddr addr, u64 data) : size(size), addr(addr), data(data) {} + std::size_t size; VAddr addr; u64 data; bool operator==(const WriteRecord& o) const { @@ -71,14 +71,14 @@ private: boost::optional Read32(VAddr addr) override; boost::optional Read64(VAddr addr) override; - bool ReadBlock(VAddr src_addr, void* dest_buffer, size_t size) override; + bool ReadBlock(VAddr src_addr, void* dest_buffer, std::size_t size) override; bool Write8(VAddr addr, u8 data) override; bool Write16(VAddr addr, u16 data) override; bool Write32(VAddr addr, u32 data) override; bool Write64(VAddr addr, u64 data) override; - bool WriteBlock(VAddr dest_addr, const void* src_buffer, size_t size) override; + bool WriteBlock(VAddr dest_addr, const void* src_buffer, std::size_t size) override; std::unordered_map data; }; -- cgit v1.2.3