From 6a72712404188c2d5fb359ea59def5454a5cfea9 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Wed, 22 Mar 2017 10:03:45 -0700 Subject: [PATCH] virtual dtor out-of-line --- src/platform.cc | 6 ++++++ src/platform.h | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/platform.cc b/src/platform.cc index 305e0fee..ee3ded3d 100644 --- a/src/platform.cc +++ b/src/platform.cc @@ -4,6 +4,12 @@ #include "../third_party/doctest/doctest/doctest.h" +PlatformMutex::~PlatformMutex() = default; + +PlatformScopedMutexLock::~PlatformScopedMutexLock() = default; + +PlatformSharedMemory::~PlatformSharedMemory() = default; + TEST_SUITE("Platform"); TEST_CASE("Mutex lock/unlock (single process)") { diff --git a/src/platform.h b/src/platform.h index 33bbdf72..7af19d0b 100644 --- a/src/platform.h +++ b/src/platform.h @@ -4,13 +4,13 @@ #include struct PlatformMutex { - virtual ~PlatformMutex() {} + virtual ~PlatformMutex(); }; struct PlatformScopedMutexLock { - virtual ~PlatformScopedMutexLock() {} + virtual ~PlatformScopedMutexLock(); }; struct PlatformSharedMemory { - virtual ~PlatformSharedMemory() {} + virtual ~PlatformSharedMemory(); void* data; size_t capacity; std::string name; @@ -23,4 +23,4 @@ std::unique_ptr CreatePlatformSharedMemory( const std::string& name, size_t size); -std::string GetWorkingDirectory(); \ No newline at end of file +std::string GetWorkingDirectory();