From: Mikko Rasa Date: Sat, 11 Jun 2011 10:41:25 +0000 (+0300) Subject: Further style fixes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d4d2018e1ba971e57eb2d8fee022b70a9c33d2e5;p=libs%2Fcore.git Further style fixes Header updates --- diff --git a/source/io/buffered.cpp b/source/io/buffered.cpp index f725223..5dbd494 100644 --- a/source/io/buffered.cpp +++ b/source/io/buffered.cpp @@ -40,7 +40,7 @@ void Buffered::flush() { unsigned len = below.write(begin, used); - begin=end = buf; + begin = end = buf; if(len +#include #include #include -#include +#include #include #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 { diff --git a/source/io/poll.h b/source/io/poll.h index 6367d8f..5952374 100644 --- a/source/io/poll.h +++ b/source/io/poll.h @@ -61,15 +61,16 @@ private: bool pfd_dirty; SlotSeq poll_result; - void rebuild_pfd(); - int do_poll(int); - public: Poller(); void set_object(Base &, PollEvent); int poll(); int poll(const Time::TimeDelta &); +private: + void rebuild_pfd(); + int do_poll(int); +public: const SlotSeq &get_result() const { return poll_result; } }; diff --git a/source/io/serial.cpp b/source/io/serial.cpp index dbfee95..5d5871e 100644 --- a/source/io/serial.cpp +++ b/source/io/serial.cpp @@ -5,8 +5,8 @@ #include #include #endif +#include #include -#include #include "serial.h" using namespace std;