[vdr] Re: cString operator= with same buffer

Clemens Kirchgatterer clemens at 1541.org
Fri Nov 25 13:56:09 CET 2005


Holger Brunn <holger.brunn at stud.uni-karlsruhe.de> wrote:

> > I think something should be done to fix the "assign cString to
> > itself" case, even though this is very unlikely. This does go wrong
> > with the current code, even with the copy constructor added.
> 
> Okay, now as all seems to be said, here is a patch that checks for
> that case (that may happen when working with references/pointers to
> cStrings), leaving Klaus with the decision whether it's useful to
> have it or not.

why not just:

typedef std::string cString;

or:

class cString : public std::string { ... };

i really can't understand all this messing with a datatype allready
implemented elsewhere. what is so special about cString that other
string implementations do not have?

my 0.02E
clemens



More information about the vdr mailing list