1
0
Fork 0
forked from suyu/suyu

Merge pull request #2227 from lioncash/override

renderer_opengl/gl_global_cache: Add missing override specifiers
This commit is contained in:
bunnei 2019-03-13 17:05:49 -04:00 committed by GitHub
commit 4e6c667586
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -57,8 +57,8 @@ GlobalRegion GlobalRegionCacheOpenGL::GetUncachedGlobalRegion(VAddr addr, u32 si
return region; return region;
} }
void GlobalRegionCacheOpenGL::ReserveGlobalRegion(const GlobalRegion& region) { void GlobalRegionCacheOpenGL::ReserveGlobalRegion(GlobalRegion region) {
reserve[region->GetAddr()] = region; reserve.insert_or_assign(region->GetAddr(), std::move(region));
} }
GlobalRegionCacheOpenGL::GlobalRegionCacheOpenGL(RasterizerOpenGL& rasterizer) GlobalRegionCacheOpenGL::GlobalRegionCacheOpenGL(RasterizerOpenGL& rasterizer)

View file

@ -30,12 +30,12 @@ public:
explicit CachedGlobalRegion(VAddr addr, u32 size); explicit CachedGlobalRegion(VAddr addr, u32 size);
/// Gets the address of the shader in guest memory, required for cache management /// Gets the address of the shader in guest memory, required for cache management
VAddr GetAddr() const { VAddr GetAddr() const override {
return addr; return addr;
} }
/// Gets the size of the shader in guest memory, required for cache management /// Gets the size of the shader in guest memory, required for cache management
std::size_t GetSizeInBytes() const { std::size_t GetSizeInBytes() const override {
return size; return size;
} }
@ -70,7 +70,7 @@ public:
private: private:
GlobalRegion TryGetReservedGlobalRegion(VAddr addr, u32 size) const; GlobalRegion TryGetReservedGlobalRegion(VAddr addr, u32 size) const;
GlobalRegion GetUncachedGlobalRegion(VAddr addr, u32 size); GlobalRegion GetUncachedGlobalRegion(VAddr addr, u32 size);
void ReserveGlobalRegion(const GlobalRegion& region); void ReserveGlobalRegion(GlobalRegion region);
std::unordered_map<VAddr, GlobalRegion> reserve; std::unordered_map<VAddr, GlobalRegion> reserve;
}; };