yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

arm_test_common: Get rid of truncation warnings

Explicitly cast the value to a u8 to show that this is intentional.
This commit is contained in:
Lioncash 2018-07-20 17:53:50 -04:00
parent a8bb1eb39f
commit 48733744bb
1 changed files with 5 additions and 2 deletions

View File

@ -65,10 +65,13 @@ boost::optional<bool> TestEnvironment::TestMemory::IsValidAddress(VAddr addr) {
} }
boost::optional<u8> TestEnvironment::TestMemory::Read8(VAddr addr) { boost::optional<u8> TestEnvironment::TestMemory::Read8(VAddr addr) {
auto iter = data.find(addr); const auto iter = data.find(addr);
if (iter == data.end()) { if (iter == data.end()) {
return addr; // Some arbitrary data // Some arbitrary data
return static_cast<u8>(addr);
} }
return iter->second; return iter->second;
} }