X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fhandle.cpp;h=53b5a7e4fbf8643a1a2347e4540593f63d72de1c;hb=4ad05c650c55e3edccea887d15b26f41cdf60fb6;hp=d5183e5b4a349d286f9858e85c3c28234ac5970f;hpb=3b8384a993aed55b348bf51bb02900b3aa010ef8;p=libs%2Fcore.git diff --git a/source/io/handle.cpp b/source/io/handle.cpp index d5183e5..53b5a7e 100644 --- a/source/io/handle.cpp +++ b/source/io/handle.cpp @@ -25,25 +25,17 @@ Handle::~Handle() delete priv; } -Handle::operator const void *() const +Handle::operator bool() const { -#ifdef WIN32 - return priv->handle!=INVALID_HANDLE_VALUE ? this : 0; -#else - return priv->handle!=-1 ? this : 0; -#endif + return priv->handle!=INVALID_HANDLE_VALUE; } Handle::Private::Private(): -#ifdef WIN32 handle(INVALID_HANDLE_VALUE) -#else - handle(-1) -#endif { } -Handle::Private &Handle::Private::operator=(H h) +Handle::Private &Handle::Private::operator=(PlatformHandle h) { handle = h; return *this;