diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.h')
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.h b/protocols/SkypeWeb/src/skype_utils.h index e9c1275334..34c2324dda 100644 --- a/protocols/SkypeWeb/src/skype_utils.h +++ b/protocols/SkypeWeb/src/skype_utils.h @@ -80,13 +80,12 @@ class EventHandle {
HANDLE _hEvent;
public:
- inline EventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
- inline ~EventHandle() { CloseHandle(_hEvent); }
- inline void Set() { SetEvent(_hEvent); }
- inline void Wait() { WaitForSingleObject(_hEvent, INFINITE); }
- inline void Wait(DWORD dwMilliseconds) { WaitForSingleObject(_hEvent, dwMilliseconds); }
- inline operator HANDLE() { return _hEvent; }
+ __inline explicit EventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
+ __inline explicit EventHandle(HANDLE hEvent) : _hEvent(hEvent) {}
+ __inline ~EventHandle() { CloseHandle(_hEvent); }
+ __inline void Set() { SetEvent(_hEvent); }
+ __inline void Wait(DWORD dwMilliseconds = INFINITE) { WaitForSingleObject(_hEvent, dwMilliseconds); }
+ __inline operator HANDLE() { return _hEvent; }
};
-
#endif //_UTILS_H_
\ No newline at end of file |