On 01/10/2010 09:26, Noel O'Boyle wrote: > Hi Chris, > > I noticed that you have disabled the warning on forcing int etc. value > to bool 'true' or 'false' (performance warning). > > Are you sure this is a good idea? I think each of these is a logic > error and should be corrected. If a function is supposed to return a > bool, and attempts to return an int, there's something up. > > - Noel
I don't think that this is a logic error. You would get it with this code (which is, I think, a longstanding normal C++ idiom): int i = 3; while(i) { ... --i; } To avoid the warning you would have to write while(i!=0). The compiler will give an error, rather than a warning, if the value cannot be implicitly converted to a bool, for real logic errors. Actually, a more dangerous warning being ignored is logic comparisons between signed and unsigned integers. There are a lot of those. Chris ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel