Browse Source

Fix incorrect check.

ObjPtr
Michael Uleysky 9 years ago
parent
commit
90f6c74c0a
  1. 2
      include/common.h

2
include/common.h

@ -59,7 +59,7 @@ class OBType
OBType() = delete;
OBType(OBType&&) = delete;
OBType(OBType&) = delete;
OBType(const ObjectBase* arg):iszero(0==p) {if(0==arg) p=0; else if(typeid(*arg)==typeid(O)) p=dynamic_cast<const O*>(arg); else p=0;}
OBType(const ObjectBase* arg):iszero(0==arg) {if(0==arg) p=0; else if(typeid(*arg)==typeid(O)) p=dynamic_cast<const O*>(arg); else p=0;}
const O* operator->() const {return p;}
operator bool() const {return 0!=p;}
operator const O*() const {return p;}

Loading…
Cancel
Save