passing NULL to non-pointer
passing NULL to non-pointer
- Subject: passing NULL to non-pointer
- From: Steve Mills <email@hidden>
- Date: Mon, 12 Dec 2005 17:29:21 -0600
(Doh! I forgot a subject when I posted this before. Sorry.)
Not sure if this is a bug or part of the spec. Template class
CPureRefCountPtr has this method:
CPureRefCountPtr<T>& operator=(T *pObject)
Subclass CAutoPlatformBitmap inherits from CPureRefCountPtr and has
this ctor:
CAutoPlatformBitmap(bool bCreate = true);
When calling:
CAutoPlatformBitmap bm;
bm = NULL;
Xcode warns:
warning: passing NULL to non-pointer argument 1 of
'PortLib::CAutoPlatformBitmap::CAutoPlatformBitmap(bool)'
CodeWarrior knows that the calling code means to use the operator=
(T*) in the base class. Which is correct?
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden