From: Mikko Rasa Date: Mon, 13 Jun 2011 14:15:54 +0000 (+0300) Subject: Minor change to EventReader to avoid an invalid handle error on windows X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=1986375ad6a114fe57bf7863c49021dc21534cf5;p=libs%2Fcore.git Minor change to EventReader to avoid an invalid handle error on windows --- diff --git a/source/io/eventreader.cpp b/source/io/eventreader.cpp index a31a384..370ddf2 100644 --- a/source/io/eventreader.cpp +++ b/source/io/eventreader.cpp @@ -37,8 +37,6 @@ EventReader::EventReader(Handle &h, unsigned size): priv->buffer = new char[priv->buf_size]; priv->buf_avail = 0; priv->buf_next = priv->buffer; - - start(); #else (void)size; #endif @@ -54,9 +52,10 @@ EventReader::~EventReader() delete priv; } -const Handle &EventReader::get_event() const +const Handle &EventReader::get_event() { #ifdef WIN32 + start(); return priv->event; #else return handle; diff --git a/source/io/eventreader.h b/source/io/eventreader.h index b3acdb9..01c3721 100644 --- a/source/io/eventreader.h +++ b/source/io/eventreader.h @@ -30,7 +30,7 @@ public: EventReader(Handle &, unsigned); ~EventReader(); - const Handle &get_event() const; + const Handle &get_event(); void start(); void wait();