aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/memory_manager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-24 11:51:10 -0400
committerLioncash <mathew1800@gmail.com>2018-07-24 11:56:30 -0400
commit4cab632ba6338538fd8a2fb18aa3387b14d6077c (patch)
tree433db385d100acb4f58e0dfa53aabf7339c45073 /src/video_core/memory_manager.cpp
parent38ad89a19b6b98c2ce6ed282d742a171a8fcad7c (diff)
video_core/memory_manager: Replace a loop with std::array's fill() function in PageSlot()
We already have a function that does what this code was doing, so let's use that instead.
Diffstat (limited to 'src/video_core/memory_manager.cpp')
-rw-r--r--src/video_core/memory_manager.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp
index 98a6ca0401..ca923d17db 100644
--- a/src/video_core/memory_manager.cpp
+++ b/src/video_core/memory_manager.cpp
@@ -138,9 +138,7 @@ VAddr& MemoryManager::PageSlot(GPUVAddr gpu_addr) {
auto& block = page_table[(gpu_addr >> (PAGE_BITS + PAGE_TABLE_BITS)) & PAGE_TABLE_MASK];
if (!block) {
block = std::make_unique<PageBlock>();
- for (unsigned index = 0; index < PAGE_BLOCK_SIZE; index++) {
- (*block)[index] = static_cast<u64>(PageStatus::Unmapped);
- }
+ block->fill(static_cast<VAddr>(PageStatus::Unmapped));
}
return (*block)[(gpu_addr >> PAGE_BITS) & PAGE_BLOCK_MASK];
}