HaikuDepot: Lists in the Model use Custom List Class
|Reported by:||apl-haiku||Owned by:||stippi|
Some of the data-model in HaikuDepot (HD) uses a custom list class
List<T>. There is a warning in this class because it is using
memmove on C++ objects which is not allowed;
../haiku/src/apps/haikudepot/textview/ParagraphLayout.h:121:36: required from here ../haiku/src/apps/haikudepot/List.h:273:11: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'class TextSpan' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess] memcpy(fItems, other.fItems, fCount * sizeof(ItemType));
The List has a notion of being able to maintain a sort ordering in order to speed-up searches into the list.
It is possible to stop the warning from failing the build with the following line in the Jamfile;
ObjectC++Flags Model.cpp : -Wno-error=class-memaccess ;
One this problem is resolved; remove this line from the Jamfile if it is there.
However perhaps a better solution would be to use