I looked at lineend.h briefly - it contains the definitions of FilteringInputStreambuf template and LineEndingExtractor which together form LErdbuf. This seems like a horribly over-engineered solution to convert DOS and Mac linebreaks into Unix-style "\n". Moreover since it contains hard-coded ASCII codes for CR and LF I'm not even sure if it will work with different locales and/or codepages. I'm surprised if there is no GPL library which can achieve the same in more portable and less convoluted way. Or there is some deep meaning to this contortionist's way to convert "\r\n" into "\n" by having race conditions for object deallocation that I completely missed?
Igor On Thu, 2010-08-12 at 11:41 -0400, Geoffrey Hutchison wrote: > > base class?) Then the original OBConversion gets destroyed. It tries > > to delete the source again as part of "delete pLineEndBuf" but it has > > already been deleted. If we had access to the destructor we could fix > > this. > > This makes sense. I think a good solution would be to use a smart pointer for > this -- it will detect the double-delete behavior. > > Chris, I think we already use this in a few places, so why don't we use the > shared_ptr type when available? > > -Geoff > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > OpenBabel-Devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/openbabel-devel ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ OpenBabel-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-devel
