Proposal KLatin1String
Dr. Juergen Pfennig
info at j-pfennig.de
Mon Mar 29 12:14:47 CEST 2004
> I think everyone here would be curious to see the implementation of this
> class. Do you have some code to share already?
Yes, but in a very early stage. I must confess that I did not look at the code
for KLatinString(Literal) before. Now I did - and I am not sure that the
current implementation will speed-up things or reduce the code size
significantly. The problem with such classes it that they must provide a
significant improvement or must provide some nice functionality. Otherwise
there is no reason to use them and they would only add complexity to KDE.
A technical concern about KLatinString(Literal) is that data() returns a
pointer to memory that is not managed by the KLatinSring(Literal) class. The
assumption is that the data passed to the xtor is static and remains valid
for the lifetime of a KLatinString(Literal). This is a dangerous thing and
may lead to instable code when programmers forget to respect these
restrictions.
Yours Jürgen
More information about the Kde-optimize
mailing list