X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Feventreader.h;h=c4ae56b1de75567201a4215b4e47da61fa3a4368;hp=01c3721e895a17e728b89500fd36e8a6bd3e1aa0;hb=HEAD;hpb=1986375ad6a114fe57bf7863c49021dc21534cf5 diff --git a/source/io/eventreader.h b/source/io/eventreader.h index 01c3721..11091ab 100644 --- a/source/io/eventreader.h +++ b/source/io/eventreader.h @@ -1,6 +1,7 @@ #ifndef MSP_IO_EVENTREADER_H_ #define MSP_IO_EVENTREADER_H_ +#include #include "handle.h" namespace Msp { @@ -18,23 +19,23 @@ empty, a new overlapped read is started. Unix-based systems can poll the fd directly, so this class reduces to a simple passthrough to sys_read. */ -class EventReader +class EventReader: private NonCopyable { private: struct Private; Handle &handle; - Private *priv; + Private *priv = nullptr; public: - EventReader(Handle &, unsigned); + EventReader(Handle &, std::size_t); ~EventReader(); const Handle &get_event(); void start(); void wait(); - unsigned read(char *, unsigned); + unsigned read(char *, std::size_t); }; } // namespace IO