summaryrefslogtreecommitdiff
path: root/wait.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wait.cpp')
-rw-r--r--wait.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/wait.cpp b/wait.cpp
index c97d714..99a2ad4 100644
--- a/wait.cpp
+++ b/wait.cpp
@@ -94,7 +94,7 @@ DWORD WINAPI WaitingThread(LPVOID lParam)
handles[0] = thread.stopWaiting;
std::copy(thread.waitHandles, thread.waitHandles+thread.count, handles.begin()+1);
- DWORD result = ::WaitForMultipleObjects(handles.size(), handles.begin(), FALSE, INFINITE);
+ DWORD result = ::WaitForMultipleObjects(handles.size(), &handles[0], FALSE, INFINITE);
if (result == WAIT_OBJECT_0)
continue; // another thread finished waiting first, so do nothing
@@ -154,7 +154,7 @@ bool WaitObjectContainer::Wait(unsigned long milliseconds)
Sleep(0);
if (i<nThreads)
{
- thread.waitHandles = m_handles.begin() + i*WAIT_OBJECTS_PER_THREAD;
+ thread.waitHandles = &m_handles[i*WAIT_OBJECTS_PER_THREAD];
thread.count = STDMIN(WAIT_OBJECTS_PER_THREAD, m_handles.size() - i*WAIT_OBJECTS_PER_THREAD);
thread.error = &error;
}