From 48e4931518b2c484c29c0808821f2298623fbd53 Mon Sep 17 00:00:00 2001 From: Attila Afra Date: Sat, 9 Nov 2024 21:52:13 +0200 Subject: [PATCH] minor cleanup --- core/device.cpp | 8 ++++++++ core/device.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/core/device.cpp b/core/device.cpp index dd9b8991..8b7bcd2b 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -334,4 +334,12 @@ OIDN_NAMESPACE_BEGIN } } + void Device::syncAndThrow(SyncMode sync) + { + if (sync == SyncMode::Blocking) + waitAndThrow(); + else + flush(); + } + OIDN_NAMESPACE_END diff --git a/core/device.h b/core/device.h index 88e09b0c..76262ecc 100644 --- a/core/device.h +++ b/core/device.h @@ -128,13 +128,7 @@ OIDN_NAMESPACE_BEGIN void waitAndThrow(); // Calls waitAndThrow() or flush() depending on the sync mode - void syncAndThrow(SyncMode sync) - { - if (sync == SyncMode::Blocking) - waitAndThrow(); - else - flush(); - } + void syncAndThrow(SyncMode sync); protected: virtual void init() = 0;