On Fri, Apr 1, 2011 at 2:26 PM, Russell Bryant
<russell(a)russellbryant.net> wrote:
On Fri, Apr 1, 2011 at 5:26 AM, Andrew Beekhof
<andrew(a)beekhof.net> wrote:
> Not seeing the point of converting too and from the C++ string type.
> Why not just use char* ?
Well ... the problem I saw and went in to fix was a memory leak. I
figured the fix was either free the memory, or make it so it's not
necessary. I went with the latter. To me it's both more readable and
less error prone.
This actually seems like a bit of a project philosophy issue. This
particular code is C++ ... but how much of C++ does the project intend
to take advantage of? Where are the lines drawn?
If I have anything to do with it... as little as possible :-)
But specifically in this case, where the input is a char* and the
usage is as a char*, it doesn't make much sense to store it as a C++
string in between.