From: Mikko Rasa Date: Tue, 2 Nov 2021 09:55:06 +0000 (+0200) Subject: Use size_t for I/O operation sizes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8012fe7bc014388e666d770a8cf0a239bb1350d1;p=libs%2Fgui.git Use size_t for I/O operation sizes --- diff --git a/source/input/linux/gamecontroller.cpp b/source/input/linux/gamecontroller.cpp index 3a2baa8..f0139e9 100644 --- a/source/input/linux/gamecontroller.cpp +++ b/source/input/linux/gamecontroller.cpp @@ -123,12 +123,12 @@ string JsDevice::get_name() const return buf; } -unsigned JsDevice::do_read(char *buf, unsigned size) +size_t JsDevice::do_read(char *buf, size_t size) { return IO::sys_read(handle, buf, size); } -unsigned JsDevice::do_write(const char *, unsigned) +size_t JsDevice::do_write(const char *, size_t) { throw IO::invalid_access(IO::M_WRITE); } diff --git a/source/input/linux/gamecontroller_platform.h b/source/input/linux/gamecontroller_platform.h index 9fa7dcb..9bc6f58 100644 --- a/source/input/linux/gamecontroller_platform.h +++ b/source/input/linux/gamecontroller_platform.h @@ -22,8 +22,8 @@ public: virtual void set_inherit(bool) { } protected: - virtual unsigned do_read(char *, unsigned); - virtual unsigned do_write(const char *, unsigned); + virtual std::size_t do_read(char *, std::size_t); + virtual std::size_t do_write(const char *, std::size_t); public: virtual const IO::Handle &get_handle(IO::Mode) { return handle; }