KDevVarLengthArray: memmove / memcopy?

Syron mr.syron at googlemail.com
Sun Jul 3 13:24:40 UTC 2011

If this is topic is still relevant:

I had some time thinking about the KDevVarLengthArray class. Fact is 
that the QVarLengthArray is only a RAII wrapper around ordinary C-style 
arrays that is not supposed to have insert/indexOf/remove/etc. 
semantics. I think that replacing the array wrapper with a QVector/QList 
would be better, esp. considering implementing copy-on-write semantics 
in the involved classes and then using Q_DECLARE_TYPEINFO on them so 
that the containers may optimize their operations, in the best case it 
will boil down to the mentioned memmove/memcpy calls (I also had some 
time investigating the container implementations and interfaces).

And yes, I am aware of the work that such a rewrite would take, so take 
this only as another point of view.

-- Syron

More information about the KDevelop-devel mailing list