summaryrefslogtreecommitdiffstats
path: root/src/tests/core/arm/arm_test_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/core/arm/arm_test_common.cpp')
-rw-r--r--src/tests/core/arm/arm_test_common.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tests/core/arm/arm_test_common.cpp b/src/tests/core/arm/arm_test_common.cpp
index 7f9f27e19..539746246 100644
--- a/src/tests/core/arm/arm_test_common.cpp
+++ b/src/tests/core/arm/arm_test_common.cpp
@@ -10,8 +10,6 @@
namespace ArmTests {
-static Memory::PageTable* page_table = nullptr;
-
TestEnvironment::TestEnvironment(bool mutable_memory_)
: mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) {
@@ -67,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;
}