]> git.tdb.fi Git - libs/core.git/blobdiff - source/mode.h
Move class members and comments around
[libs/core.git] / source / mode.h
index 1d944b11b3326bd64bf0e3ad3aeebd0d99d2492a..5e103f278907be65a1f7f91da38ac34c5d113301 100644 (file)
@@ -1,9 +1,3 @@
-/* $Id$
-
-This file is part of libmspio
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
 #ifndef MSP_IO_MODE_H_
 #define MSP_IO_MODE_H_
 
@@ -12,22 +6,22 @@ namespace IO {
 
 enum Mode
 {
-       M_NONE=0,
-       M_READ=1,
-       M_WRITE=2,
-       M_RDWR=M_READ|M_WRITE,
-       M_APPEND=4,
-       M_NONBLOCK=8
+       M_NONE = 0,
+       M_READ = 1,
+       M_WRITE = 2,
+       M_RDWR = M_READ|M_WRITE,
+       M_APPEND = 4,
+       M_NONBLOCK = 8
 };
 
 inline Mode operator|(Mode m, Mode n)
-{ return Mode((int)m|(int)n); }
+{ return Mode(static_cast<int>(m)|static_cast<int>(n)); }
 
 inline Mode operator&(Mode m, Mode n)
-{ return Mode((int)m&(int)n); }
+{ return Mode(static_cast<int>(m)&static_cast<int>(n)); }
 
 inline Mode operator~(Mode m)
-{ return Mode(~(int)m); }
+{ return Mode(~static_cast<int>(m)); }
 
 } // namespace IO
 } // namespace Msp