Files
RetroArch/ui
libretroadmin f81493266a qt: hold pending-thumbnail queue in QList to silence -Wclass-memaccess
m_pendingPlaylistThumbnails is a QVector<QHash<QString, QString>> drained
with takeAt(0). QVector::takeAt -> remove -> erase relocates the tail with
memmove(T*, T*, n * sizeof(T)); since QHash is not trivially copyable
(ref-counted d-pointer), GCC flags this via -Wclass-memaccess deep in
Qt5's qvector.h:

  writing to an object of type 'class QHash<QString, QString>' with no
  trivial copy-assignment; use copy-assignment or copy-initialization

Switch the member to QList<QHash<QString, QString>>. QList relocates its
void* node slots (a trivial type), storing the movable, pointer-sized
QHash inline, so the erase path no longer memmoves QHash objects and the
warning goes away. The queue is used only via clear()/count()/append()/
takeAt(), all QList-compatible, and is never cross-assigned with a
QVector.

The other QVector<QHash<...>> locals/return are left as-is: they only
append and iterate, and QVector::append constructs complex types rather
than memmoving them, so they do not trip the warning.
2026-07-16 02:12:58 +02:00
..
2025-02-11 10:28:16 +01:00