summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-10 01:13:14 +0200
committerLioncash <mathew1800@gmail.com>2019-05-10 01:14:36 +0200
commit716fbaef743e46a063dc8b4e5e542e0c2ee2141e (patch)
tree5ed53f3890245da07727ee0a7faa9b12447d1208 /src/video_core
parentvideo_core/memory_manager: Mark the constructor as explicit (diff)
downloadyuzu-716fbaef743e46a063dc8b4e5e542e0c2ee2141e.tar
yuzu-716fbaef743e46a063dc8b4e5e542e0c2ee2141e.tar.gz
yuzu-716fbaef743e46a063dc8b4e5e542e0c2ee2141e.tar.bz2
yuzu-716fbaef743e46a063dc8b4e5e542e0c2ee2141e.tar.lz
yuzu-716fbaef743e46a063dc8b4e5e542e0c2ee2141e.tar.xz
yuzu-716fbaef743e46a063dc8b4e5e542e0c2ee2141e.tar.zst
yuzu-716fbaef743e46a063dc8b4e5e542e0c2ee2141e.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/memory_manager.cpp4
-rw-r--r--src/video_core/memory_manager.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp
index 2890ea947..5d8d126c1 100644
--- a/src/video_core/memory_manager.cpp
+++ b/src/video_core/memory_manager.cpp
@@ -201,11 +201,11 @@ const u8* MemoryManager::GetPointer(GPUVAddr addr) const {
return {};
}
-bool MemoryManager::IsBlockContinous(const GPUVAddr start, const std::size_t size) {
+bool MemoryManager::IsBlockContinuous(const GPUVAddr start, const std::size_t size) const {
const GPUVAddr end = start + size;
const auto host_ptr_start = reinterpret_cast<std::uintptr_t>(GetPointer(start));
const auto host_ptr_end = reinterpret_cast<std::uintptr_t>(GetPointer(end));
- const std::size_t range = static_cast<std::size_t>(host_ptr_end - host_ptr_start);
+ const auto range = static_cast<std::size_t>(host_ptr_end - host_ptr_start);
return range == size;
}
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h
index f69a25706..113f9d8f3 100644
--- a/src/video_core/memory_manager.h
+++ b/src/video_core/memory_manager.h
@@ -66,8 +66,8 @@ public:
u8* GetPointer(GPUVAddr addr);
const u8* GetPointer(GPUVAddr addr) const;
- // Returns true if the block is continuous in host memory, false otherwise
- bool IsBlockContinous(GPUVAddr start, std::size_t size);
+ /// Returns true if the block is continuous in host memory, false otherwise
+ bool IsBlockContinuous(GPUVAddr start, std::size_t size) const;
/**
* ReadBlock and WriteBlock are full read and write operations over virtual