aboutsummaryrefslogtreecommitdiff
path: root/src/tests/core/arm/arm_test_common.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-20 17:53:50 -0400
committerLioncash <mathew1800@gmail.com>2018-07-20 17:53:53 -0400
commit633cba28481b90f57b521620911ed41f62fa0d6e (patch)
treeb1fc7f9ed0a5651a05ac7cee15802ca3e34c9c81 /src/tests/core/arm/arm_test_common.cpp
parent193e23b12feebe19f2e425ef72f6010b6871e1e2 (diff)
arm_test_common: Get rid of truncation warnings
Explicitly cast the value to a u8 to show that this is intentional.
Diffstat (limited to 'src/tests/core/arm/arm_test_common.cpp')
-rw-r--r--src/tests/core/arm/arm_test_common.cpp7
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 2af487b6a4..539746246b 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) {
}
boost::optional<u8> TestEnvironment::TestMemory::Read8(VAddr addr) {
- auto iter = data.find(addr);
+ const auto iter = data.find(addr);
+
if (iter == data.end()) {
- return addr; // Some arbitrary data
+ // Some arbitrary data
+ return static_cast<u8>(addr);
}
+
return iter->second;
}