diff options
| author | 2018-07-20 17:53:50 -0400 | |
|---|---|---|
| committer | 2018-07-20 17:53:53 -0400 | |
| commit | 48733744bb38d3a18af9713096f6e9b729944bb2 (patch) | |
| tree | b1fc7f9ed0a5651a05ac7cee15802ca3e34c9c81 | |
| parent | arm_test_common: Make file static variable a member variable of the testing e... (diff) | |
| download | yuzu-48733744bb38d3a18af9713096f6e9b729944bb2.tar.gz yuzu-48733744bb38d3a18af9713096f6e9b729944bb2.tar.xz yuzu-48733744bb38d3a18af9713096f6e9b729944bb2.zip | |
arm_test_common: Get rid of truncation warnings
Explicitly cast the value to a u8 to show that this is intentional.
Diffstat (limited to '')
| -rw-r--r-- | src/tests/core/arm/arm_test_common.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tests/core/arm/arm_test_common.cpp b/src/tests/core/arm/arm_test_common.cpp index 2af487b6a..539746246 100644 --- a/src/tests/core/arm/arm_test_common.cpp +++ b/src/tests/core/arm/arm_test_common.cpp | |||
| @@ -65,10 +65,13 @@ boost::optional<bool> TestEnvironment::TestMemory::IsValidAddress(VAddr addr) { | |||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | boost::optional<u8> TestEnvironment::TestMemory::Read8(VAddr addr) { | 67 | boost::optional<u8> TestEnvironment::TestMemory::Read8(VAddr addr) { |
| 68 | auto iter = data.find(addr); | 68 | const auto iter = data.find(addr); |
| 69 | |||
| 69 | if (iter == data.end()) { | 70 | if (iter == data.end()) { |
| 70 | return addr; // Some arbitrary data | 71 | // Some arbitrary data |
| 72 | return static_cast<u8>(addr); | ||
| 71 | } | 73 | } |
| 74 | |||
| 72 | return iter->second; | 75 | return iter->second; |
| 73 | } | 76 | } |
| 74 | 77 | ||