From de2dfd2633b51fb115f8281e2f4fdddb06a72de2 Mon Sep 17 00:00:00 2001 From: György Straub Date: Mon, 28 Sep 2020 14:14:48 +0100 Subject: [PATCH] Const correctness improvements for Property::Value. --- examples/simple-visuals-control/my-control-impl.cpp | 2 +- examples/styling/image-channel-control-impl.cpp | 2 +- examples/transitions/shadow-button-impl.cpp | 2 +- examples/visual-transitions/beat-control-impl.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/simple-visuals-control/my-control-impl.cpp b/examples/simple-visuals-control/my-control-impl.cpp index 6e2b6ed..9074a89 100644 --- a/examples/simple-visuals-control/my-control-impl.cpp +++ b/examples/simple-visuals-control/my-control-impl.cpp @@ -88,7 +88,7 @@ void MyControl::SetProperty(BaseObject* object, Property::Index index, const Pro { Toolkit::Visual::Base iconVisual; Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get(); - Property::Map* map = value.GetMap(); + const Property::Map* map = value.GetMap(); if(map && !map->Empty()) { iconVisual = visualFactory.CreateVisual(*map); diff --git a/examples/styling/image-channel-control-impl.cpp b/examples/styling/image-channel-control-impl.cpp index fc20650..5b64dd6 100644 --- a/examples/styling/image-channel-control-impl.cpp +++ b/examples/styling/image-channel-control-impl.cpp @@ -228,7 +228,7 @@ void ImageChannelControl::SetProperty(BaseObject* object, Property::Index index, } case Demo::ImageChannelControl::Property::IMAGE_VISUAL: { - Property::Map* map = value.GetMap(); + const Property::Map* map = value.GetMap(); if(map) { impl.mVisual = Toolkit::VisualFactory::Get().CreateVisual(*map); diff --git a/examples/transitions/shadow-button-impl.cpp b/examples/transitions/shadow-button-impl.cpp index 1b1ece8..17cd0f4 100644 --- a/examples/transitions/shadow-button-impl.cpp +++ b/examples/transitions/shadow-button-impl.cpp @@ -336,7 +336,7 @@ void ShadowButton::ResetVisual( // we are replacing an existing visual, so force relayout RelayoutRequest(); } - Property::Map* map = value.GetMap(); + const Property::Map* map = value.GetMap(); if(map) { visual = Toolkit::VisualFactory::Get().CreateVisual(*map); diff --git a/examples/visual-transitions/beat-control-impl.cpp b/examples/visual-transitions/beat-control-impl.cpp index 770b4c6..9dc35f4 100644 --- a/examples/visual-transitions/beat-control-impl.cpp +++ b/examples/visual-transitions/beat-control-impl.cpp @@ -249,7 +249,7 @@ void BeatControl::SetProperty(BaseObject* object, Property::Index index, const P // Determine if a transform.size property exists in the map, and // save it. - Property::Map* map = value.GetMap(); + const Property::Map* map = value.GetMap(); if(map) { Property::Value* value = map->Find(Visual::Property::TRANSFORM, "transform"); -- libgit2 0.21.4