]> git.tdb.fi Git - libs/gui.git/commitdiff
Use size_t for I/O operation sizes
authorMikko Rasa <tdb@tdb.fi>
Tue, 2 Nov 2021 09:55:06 +0000 (11:55 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 2 Nov 2021 09:55:06 +0000 (11:55 +0200)
source/input/linux/gamecontroller.cpp
source/input/linux/gamecontroller_platform.h

index 3a2baa8a2a0cbe7f742d30da20eae2cc7fbd5444..f0139e96baeb4b04f150bf463c5fa7f84701a83f 100644 (file)
@@ -123,12 +123,12 @@ string JsDevice::get_name() const
        return buf;
 }
 
        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);
 }
 
 {
        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);
 }
 {
        throw IO::invalid_access(IO::M_WRITE);
 }
index 9fa7dcb2e0b5d9a544dce693c93d8d85354afa64..9bc6f589b36ba0af40ee19a028cf322753421294 100644 (file)
@@ -22,8 +22,8 @@ public:
        virtual void set_inherit(bool) { }
 
 protected:
        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; }
 
 public:
        virtual const IO::Handle &get_handle(IO::Mode) { return handle; }