Re: Infinit loop in TreeItemId operator ==
Michael Eddington <[email protected]> Sat, 3 Dec 2005 16:24:27 -0800
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
Yes, that fixed the bug. Someone with CVS access want to make the change? mike On 12/2/05, Gustavo Ramos <[email protected]> wrote: > Hello Michael, > > What about doing casts? > > if ((id1 as Object) == null && (id2 as Object) == > null) > return false; > > Regards, > > Gustavo > > On 11/29/05, Michael Eddington <[email protected]> wrote: > > > > When performing an if(id==null) in my code I started getting stack > > overfow errors from this function. I beleave the use of "==" inside > > of the "operator ==" is causing an infinit loop? > > > > public static bool operator == (TreeItemId id1, TreeItemId > id2) > > { > > if (id1 == null && id2 == null) > > return false; > > return wxTreeItemId_Equal(Object.SafePtr(id1), > Object.SafePtr(id2)); > > } > > > > > > mike > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick > > _______________________________________________ > > wxnet-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/wxnet-users > > > > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click