Const correctness improvements for Property::Value. 74/244974/4
authorGyörgy Straub <g.straub@partner.samsung.com>
Mon, 28 Sep 2020 12:09:02 +0000 (13:09 +0100)
committerGyörgy Straub <g.straub@partner.samsung.com>
Tue, 29 Sep 2020 08:40:35 +0000 (09:40 +0100)
commitfe71d25508b063c49d6be5514c088fb3508f41d9
tree55c33b36aa51d5394bbf544e4fab89a011a0788c
parenta3e16e6a0953a76021d91eddc3d8683f9017e9a2
Const correctness improvements for Property::Value.

GetArray() and GetMap() return non-const pointers, which allow const
objects being modified. While DALi itself doesn't seem to abuse this
in client code it may still lead to hard to trace bugs or UB at worst.

It makes sense that the modification of an element of a Property::Map
or Array that a Property::Value holds, means modification of the
Property::Value itself.

- GetArray/Map() const has been changed to return pointer-to-consts;
- a non-const counterpart has been added to each;

Change-Id: I187770bbb3cf355fbf1df95c909bad3ddc8cdb23
Signed-off-by: György Straub <g.straub@partner.samsung.com>
dali/internal/event/common/property-metadata.cpp
dali/internal/event/rendering/shader-impl.cpp
dali/public-api/object/property-value.cpp
dali/public-api/object/property-value.h