]> git.tdb.fi Git - libs/core.git/commitdiff
Move Handle::operator void * to the common part
authorMikko Rasa <tdb@tdb.fi>
Tue, 15 Oct 2013 12:46:38 +0000 (15:46 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 15 Oct 2013 12:46:38 +0000 (15:46 +0300)
source/io/handle.cpp
source/io/unix/handle.cpp
source/io/windows/handle.cpp

index c20f067e5a6ca18b3d04c1c39b173d9ea7ccfe0b..693f93f4c1dbf16e052645c416d582b16702e361 100644 (file)
@@ -25,6 +25,11 @@ Handle::~Handle()
        delete priv;
 }
 
        delete priv;
 }
 
+Handle::operator const void *() const
+{
+       return priv->handle!=INVALID_HANDLE_VALUE ? this : 0;
+}
+
 
 Handle::Private::Private():
        handle(INVALID_HANDLE_VALUE)
 
 Handle::Private::Private():
        handle(INVALID_HANDLE_VALUE)
index ea8fa4eeb9797e12f5a598f4c63d0fe6e352d492..307da64fac0a374b32341c05c9092548d69f1ce4 100644 (file)
@@ -8,12 +8,6 @@
 namespace Msp {
 namespace IO {
 
 namespace Msp {
 namespace IO {
 
-Handle::operator const void *() const
-{
-       return priv->handle!=-1 ? this : 0;
-}
-
-
 void sys_set_blocking(Handle &handle, bool b)
 {
        int flags = fcntl(*handle, F_GETFD);
 void sys_set_blocking(Handle &handle, bool b)
 {
        int flags = fcntl(*handle, F_GETFD);
index 17aabb080bb113c3e8e35a59f5cb7ae2f5fdafef..2dac33fa2b531dc88db375bea661f5b991aa6a15 100644 (file)
@@ -5,12 +5,6 @@
 namespace Msp {
 namespace IO {
 
 namespace Msp {
 namespace IO {
 
-Handle::operator const void *() const
-{
-       return priv->handle!=INVALID_HANDLE_VALUE ? this : 0;
-}
-
-
 void sys_set_blocking(Handle &, bool)
 {
 }
 void sys_set_blocking(Handle &, bool)
 {
 }