Skip to content
Permalink
Browse files

Fix use of uninitialised variable in class Event

  • Loading branch information
Zeno- committed May 1, 2016
1 parent c957346 commit c1a0ebb725d6ac05e94cc6ad8507106636b63326
Showing with 7 additions and 4 deletions.
  1. +6 −3 src/threading/event.cpp
  2. +1 −1 src/threading/event.h
@@ -25,17 +25,20 @@ DEALINGS IN THE SOFTWARE.

#include "threading/event.h"

#if __cplusplus < 201103L
Event::Event()
: notified(false)
{
#ifdef _WIN32
#if __cplusplus < 201103L
# ifdef _WIN32
event = CreateEvent(NULL, false, false, NULL);
#else
# 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();

0 comments on commit c1a0ebb

Please sign in to comment.