From 53308f5235c4c6cc0eb263709ff0336a86207882 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 8 May 2009 14:14:38 +0200 Subject: [PATCH] swig 1.3.39 wraps also operator bool.. we dont like this yet... --- lib/base/smartptr.h | 3 +-- lib/service/iservice.h | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/base/smartptr.h b/lib/base/smartptr.h index ac6b9eb0..a2c6691f 100644 --- a/lib/base/smartptr.h +++ b/lib/base/smartptr.h @@ -57,11 +57,10 @@ public: #ifndef SWIG T* grabRef() { if (!ptr) return 0; ptr->AddRef(); return ptr; } T* &ptrref() { ASSERT(!ptr); return ptr; } + operator bool() const { return !!this->ptr; } #endif T* operator->() const { ptrAssert(ptr); return ptr; } operator T*() const { return this->ptr; } - - operator bool() const { return !!this->ptr; } }; diff --git a/lib/service/iservice.h b/lib/service/iservice.h index 8e3cec6f..22ffde6f 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -138,6 +138,10 @@ public: data[3]=data3; data[4]=data4; } + operator bool() const + { + return valid(); + } #endif eServiceReference(int type, int flags, const std::string &path) : type(type), flags(flags), path(path) @@ -170,10 +174,6 @@ public: return r < 0; return path < c.path; } - operator bool() const - { - return valid(); - } int valid() const { -- 2.30.2