Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: source/src/ATCDCL AIPlane.cxx, 1.8, 1.9

2009-10-22 Thread James Turner
On 22 Oct 2009, at 13:54, Erik Hofman wrote: -std::auto_ptrunsigned char ptr( buf.c_str() ); +std::auto_ptrunsigned char ptr( (unsigned char*) buf.c_str() ); This still looks wrong to me - you can't create an auto_ptr from buf.c_str(), it will delete memory

Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: source/src/ATCDCL AIPlane.cxx, 1.8, 1.9

2009-10-22 Thread James Turner
On 22 Oct 2009, at 17:23, James Turner wrote: without using a copy to turn the temporary data from c_str() into something that lives on the heap. This is factually wrong, I realise - of course the data returned by c_str() *does* live on the heap, but that does't change the original

Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: source/src/ATCDCL AIPlane.cxx, 1.8, 1.9

2009-10-22 Thread Erik Hofman
James Turner wrote: On 22 Oct 2009, at 17:23, James Turner wrote: without using a copy to turn the temporary data from c_str() into something that lives on the heap. This is factually wrong, I realise - of course the data returned by c_str() *does* live on the heap, but that does't

Re: [Flightgear-devel] [Flightgear-cvslogs] CVS: source/src/ATCDCL AIPlane.cxx, 1.8, 1.9

2009-10-22 Thread James Turner
On 22 Oct 2009, at 17:50, Erik Hofman wrote: I dislike the method of using strings to story binary data anyhow. Yes, agreed 100%. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only