mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Fix use of uninitialised variable in class Event
This commit is contained in:
parent
c95734654c
commit
c1a0ebb725
@ -25,17 +25,20 @@ DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
#include "threading/event.h"
|
#include "threading/event.h"
|
||||||
|
|
||||||
#if __cplusplus < 201103L
|
|
||||||
Event::Event()
|
Event::Event()
|
||||||
|
: notified(false)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#if __cplusplus < 201103L
|
||||||
|
# ifdef _WIN32
|
||||||
event = CreateEvent(NULL, false, false, NULL);
|
event = CreateEvent(NULL, false, false, NULL);
|
||||||
#else
|
# else
|
||||||
pthread_cond_init(&cv, NULL);
|
pthread_cond_init(&cv, NULL);
|
||||||
pthread_mutex_init(&mutex, NULL);
|
pthread_mutex_init(&mutex, NULL);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __cplusplus < 201103L
|
||||||
Event::~Event()
|
Event::~Event()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -48,8 +48,8 @@ DEALINGS IN THE SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
class Event {
|
class Event {
|
||||||
public:
|
public:
|
||||||
#if __cplusplus < 201103L
|
|
||||||
Event();
|
Event();
|
||||||
|
#if __cplusplus < 201103L
|
||||||
~Event();
|
~Event();
|
||||||
#endif
|
#endif
|
||||||
void wait();
|
void wait();
|
||||||
|
Loading…
Reference in New Issue
Block a user