diff options
| author | 2020-09-29 16:19:37 -0300 | |
|---|---|---|
| committer | 2020-09-30 02:53:34 -0300 | |
| commit | 771a9c21cc2f401cb9fd653cefcfe9da78b8f1a7 (patch) | |
| tree | 13b3f85a3024a574606639c82d58ed1e83597332 /src/common/wall_clock.h | |
| parent | Merge pull request #4721 from lioncash/genfn (diff) | |
| download | yuzu-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 '')
| -rw-r--r-- | src/common/wall_clock.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/wall_clock.h b/src/common/wall_clock.h index 5db30083d..bc7adfbf8 100644 --- a/src/common/wall_clock.h +++ b/src/common/wall_clock.h | |||
| @@ -13,6 +13,8 @@ namespace Common { | |||
| 13 | 13 | ||
| 14 | class WallClock { | 14 | class WallClock { |
| 15 | public: | 15 | public: |
| 16 | virtual ~WallClock() = default; | ||
| 17 | |||
| 16 | /// Returns current wall time in nanoseconds | 18 | /// Returns current wall time in nanoseconds |
| 17 | [[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0; | 19 | [[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0; |
| 18 | 20 | ||