[AT-SPI] Follow-up on mAccessibilityRelations 63/267163/6
authorArtur Świgoń <a.swigon@samsung.com>
Fri, 26 Nov 2021 11:47:53 +0000 (12:47 +0100)
committerArtur Świgoń <a.swigon@samsung.com>
Tue, 30 Nov 2021 15:09:59 +0000 (16:09 +0100)
commit06e51bb1b127122783024601956ccf7188144e4b
tree6f318c0fd5ec0d8d5bbaf374cbe01dd7666e6afa
parent43255aba62db53f6a8f042687687141fb9de8aa1
[AT-SPI] Follow-up on mAccessibilityRelations

The previous implementation used an `std::vector` (the outer one) as a
map, with the `RelationType` key working as the index to that vector.
However, relations are rare in practice, and every `Control::Impl`
having a 23-element vector or vectors, most, if not all of which are
empty, feels like a waste of memory.

This patch also changes the inner vector to a set, which resolves the
previously unaddressed issue of duplicate elements.

Change-Id: I639082fe49e0f6107213cda5b142a09882a3be39
dali-toolkit/devel-api/controls/accessible-impl.cpp
dali-toolkit/devel-api/controls/control-devel.cpp
dali-toolkit/internal/controls/control/control-data-impl.cpp
dali-toolkit/internal/controls/control/control-data-impl.h