Fix use of uninitialised variable in class Event

This commit is contained in:
Craig Robbins 2016-05-01 16:47:08 +10:00
parent c95734654c
commit c1a0ebb725
2 changed files with 7 additions and 4 deletions

@ -25,17 +25,20 @@ DEALINGS IN THE SOFTWARE.
#include "threading/event.h"
#if __cplusplus < 201103L
Event::Event()
: notified(false)
{
#if __cplusplus < 201103L
# ifdef _WIN32
event = CreateEvent(NULL, false, false, NULL);
# else
pthread_cond_init(&cv, NULL);
pthread_mutex_init(&mutex, NULL);
# endif
#endif
}
#if __cplusplus < 201103L
Event::~Event()
{
#ifdef _WIN32

@ -48,8 +48,8 @@ DEALINGS IN THE SOFTWARE.
*/
class Event {
public:
#if __cplusplus < 201103L
Event();
#if __cplusplus < 201103L
~Event();
#endif
void wait();