소스 검색

rasterizer_cache: Add missing virtual destructor to RasterizerCacheObject

Ensures that destruction will always do the right thing in any context.
Lioncash 7 년 전
부모
커밋
9de523fd90
3개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/video_core/CMakeLists.txt
  2. 7 0
      src/video_core/rasterizer_cache.cpp
  3. 2 0
      src/video_core/rasterizer_cache.h

+ 1 - 0
src/video_core/CMakeLists.txt

@@ -21,6 +21,7 @@ add_library(video_core STATIC
     macro_interpreter.h
     memory_manager.cpp
     memory_manager.h
+    rasterizer_cache.cpp
     rasterizer_cache.h
     rasterizer_interface.h
     renderer_base.cpp

+ 7 - 0
src/video_core/rasterizer_cache.cpp

@@ -0,0 +1,7 @@
+// Copyright 2018 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "video_core/rasterizer_cache.h"
+
+RasterizerCacheObject::~RasterizerCacheObject() = default;

+ 2 - 0
src/video_core/rasterizer_cache.h

@@ -17,6 +17,8 @@
 
 class RasterizerCacheObject {
 public:
+    virtual ~RasterizerCacheObject();
+
     /// Gets the address of the shader in guest memory, required for cache management
     virtual VAddr GetAddr() const = 0;