summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/CPP/Windows/Synchronization.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-12-06 07:58:49 +1100
committer Vas Crabb <vas@vastheman.com>2023-12-06 07:58:49 +1100
commit79bef1e23049fdac25f1fefd132e0b6c7d2cc3a1 (patch)
tree643e9313fe86f583c4022c338677cbc12b761df7 /3rdparty/lzma/CPP/Windows/Synchronization.cpp
parent512ccf0c7c9b4f08e41038b2ed2de220e140385b (diff)
3rdparty/lzma: Updated to version 23.01.
Diffstat (limited to '3rdparty/lzma/CPP/Windows/Synchronization.cpp')
-rw-r--r--3rdparty/lzma/CPP/Windows/Synchronization.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/3rdparty/lzma/CPP/Windows/Synchronization.cpp b/3rdparty/lzma/CPP/Windows/Synchronization.cpp
index fbf919dcbda..d5542af4864 100644
--- a/3rdparty/lzma/CPP/Windows/Synchronization.cpp
+++ b/3rdparty/lzma/CPP/Windows/Synchronization.cpp
@@ -19,6 +19,30 @@ namespace NSynchronization {
DWORD WaitForMultipleObjects(DWORD count, const HANDLE *handles, BOOL wait_all, DWORD timeout);
*/
+/* clang: we need to place some virtual functions in cpp file to rid off the warning:
+ 'CBaseHandle_WFMO' has no out-of-line virtual method definitions;
+ its vtable will be emitted in every translation unit */
+CBaseHandle_WFMO::~CBaseHandle_WFMO()
+{
+}
+
+bool CBaseEvent_WFMO::IsSignaledAndUpdate()
+{
+ if (this->_state == false)
+ return false;
+ if (this->_manual_reset == false)
+ this->_state = false;
+ return true;
+}
+
+bool CSemaphore_WFMO::IsSignaledAndUpdate()
+{
+ if (this->_count == 0)
+ return false;
+ this->_count--;
+ return true;
+}
+
DWORD WINAPI WaitForMultiObj_Any_Infinite(DWORD count, const CHandle_WFMO *handles)
{
if (count < 1)