summaryrefslogtreecommitdiff
path: root/src/common/wall_clock.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-09-29 16:19:37 -0300
committerGravatar ReinUsesLisp2020-09-30 02:53:34 -0300
commit771a9c21cc2f401cb9fd653cefcfe9da78b8f1a7 (patch)
tree13b3f85a3024a574606639c82d58ed1e83597332 /src/common/wall_clock.cpp
parentMerge pull request #4721 from lioncash/genfn (diff)
downloadyuzu-771a9c21cc2f401cb9fd653cefcfe9da78b8f1a7.tar.gz
yuzu-771a9c21cc2f401cb9fd653cefcfe9da78b8f1a7.tar.xz
yuzu-771a9c21cc2f401cb9fd653cefcfe9da78b8f1a7.zip
common/wall_clock: Add virtual destructors
From -fsanitize=address, this code wasn't calling the proper destructor. Adding virtual destructors for each inherited class and the base class fixes this bug. While we are at it, mark the functions as final.
Diffstat (limited to 'src/common/wall_clock.cpp')
-rw-r--r--src/common/wall_clock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp
index 3afbdb898..7a20e95b7 100644
--- a/src/common/wall_clock.cpp
+++ b/src/common/wall_clock.cpp
@@ -15,7 +15,7 @@ namespace Common {
15using base_timer = std::chrono::steady_clock; 15using base_timer = std::chrono::steady_clock;
16using base_time_point = std::chrono::time_point<base_timer>; 16using base_time_point = std::chrono::time_point<base_timer>;
17 17
18class StandardWallClock : public WallClock { 18class StandardWallClock final : public WallClock {
19public: 19public:
20 StandardWallClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency) 20 StandardWallClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency)
21 : WallClock(emulated_cpu_frequency, emulated_clock_frequency, false) { 21 : WallClock(emulated_cpu_frequency, emulated_clock_frequency, false) {