KDevVarLengthArray: memmove / memcopy?

David Nolden david.nolden.kdevelop at art-master.de
Fri Jun 24 09:41:28 UTC 2011


QVarLengthArray is missing the convenience-functions to make it usable
as a drop-in replacement for other containers (for example indexOf or
similar), so we'll stay with KDevVarLengthArray. Otherwise hundreds of
uses would have to become significantly uglier (we had it before
adding KDevVarLengthArray). The crash-bug in QVarLengthArray which was
the main motiviation to add KDevVarLengthArray may have been fixed in
the meantime though.

Regarding memmove:
KDevVarLenghtArray is usually used for short arrays, and if the array
contains only 3 items, then the function-call to memmove would be a
significant overhead. Also, I would be very careful with the
moving-code, because it is very fragile and bug-prone.




More information about the KDevelop-devel mailing list