From 7c6c92800088e8b5d8b33ef17017b595ee7efef5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 27 Nov 2022 15:27:46 +0200 Subject: [PATCH] Use size_t in EventReader --- source/io/eventreader.h | 4 ++-- source/io/unix/eventreader.cpp | 4 ++-- source/io/windows/eventreader.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/io/eventreader.h b/source/io/eventreader.h index c4ae56b..11091ab 100644 --- a/source/io/eventreader.h +++ b/source/io/eventreader.h @@ -28,14 +28,14 @@ private: 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 diff --git a/source/io/unix/eventreader.cpp b/source/io/unix/eventreader.cpp index afb1463..b87a347 100644 --- a/source/io/unix/eventreader.cpp +++ b/source/io/unix/eventreader.cpp @@ -3,7 +3,7 @@ namespace Msp { namespace IO { -EventReader::EventReader(Handle &h, unsigned): +EventReader::EventReader(Handle &h, size_t): handle(h) { } @@ -21,7 +21,7 @@ void EventReader::start() void EventReader::wait() { } -unsigned EventReader::read(char *buf, unsigned len) +unsigned EventReader::read(char *buf, size_t len) { return sys_read(handle, buf, len); } diff --git a/source/io/windows/eventreader.cpp b/source/io/windows/eventreader.cpp index 4a0640f..33a095a 100644 --- a/source/io/windows/eventreader.cpp +++ b/source/io/windows/eventreader.cpp @@ -22,7 +22,7 @@ struct EventReader::Private }; -EventReader::EventReader(Handle &h, unsigned size): +EventReader::EventReader(Handle &h, size_t size): handle(h), priv(new Private) { @@ -92,7 +92,7 @@ void EventReader::wait() } } -unsigned EventReader::read(char *buf, unsigned len) +unsigned EventReader::read(char *buf, size_t len) { if(!priv->buf_avail) { -- 2.45.2