yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

video_core/memory_manager: Mark IsBlockContinuous() as a const member function

Corrects the typo in its name and marks the function as a const member
function, given it doesn't actually modify memory manager state.
This commit is contained in:
Lioncash 2019-05-09 19:13:14 -04:00
parent d4bcd006b2
commit 716fbaef74
2 changed files with 4 additions and 4 deletions

View File

@ -201,11 +201,11 @@ const u8* MemoryManager::GetPointer(GPUVAddr addr) const {
return {}; 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 GPUVAddr end = start + size;
const auto host_ptr_start = reinterpret_cast<std::uintptr_t>(GetPointer(start)); 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 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; return range == size;
} }

View File

@ -66,8 +66,8 @@ public:
u8* GetPointer(GPUVAddr addr); u8* GetPointer(GPUVAddr addr);
const u8* GetPointer(GPUVAddr addr) const; const u8* GetPointer(GPUVAddr addr) const;
// Returns true if the block is continuous in host memory, false otherwise /// Returns true if the block is continuous in host memory, false otherwise
bool IsBlockContinous(GPUVAddr start, std::size_t size); bool IsBlockContinuous(GPUVAddr start, std::size_t size) const;
/** /**
* ReadBlock and WriteBlock are full read and write operations over virtual * ReadBlock and WriteBlock are full read and write operations over virtual