]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/poll.cpp
Further style fixes
[libs/core.git] / source / io / poll.cpp
index a0ccf84a4c07fcf5c601edf8eac6f943241c1245..d610665161b16f47cb20a8480beb3859eb62bbbd 100644 (file)
@@ -1,7 +1,7 @@
-#include <errno.h>
+#include <cerrno>
 #include <stdexcept>
 #include <msp/core/systemerror.h>
-#include <msp/strings/formatter.h>
+#include <msp/strings/format.h>
 #include <msp/time/units.h>
 #include "base.h"
 #include "poll.h"
@@ -37,8 +37,7 @@ inline PollEvent poll_event_from_sys(int event)
        PollEvent result = P_NONE;
 
 #ifdef WIN32
-       // Stop the compiler from complaining about unused parameter
-       event = event;
+       (void)event;
 #else
        if(event&POLLIN)
                result = result|P_INPUT;
@@ -67,7 +66,7 @@ inline PollEvent do_poll(Base &obj, PollEvent pe, int timeout)
 
        return P_NONE;
 #else
-       pollfd pfd = {obj.get_event_handle(), sys_poll_event(pe), 0};
+       pollfd pfd = { obj.get_event_handle(), sys_poll_event(pe), 0 };
 
        int ret = ::poll(&pfd, 1, timeout);
        if(ret==-1)
@@ -84,6 +83,7 @@ inline PollEvent do_poll(Base &obj, PollEvent pe, int timeout)
 
 }
 
+
 namespace Msp {
 namespace IO {