From 574e69fb379cd54fc3034fe45a155e770435b97d Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 15 Sep 2019 17:06:34 +0800 Subject: ... --- src/ui/controls/flex_layout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/controls/flex_layout.cpp') diff --git a/src/ui/controls/flex_layout.cpp b/src/ui/controls/flex_layout.cpp index bb8e3c14..a8200a12 100644 --- a/src/ui/controls/flex_layout.cpp +++ b/src/ui/controls/flex_layout.cpp @@ -22,7 +22,7 @@ FlexChildLayoutData FlexLayout::GetChildLayoutData(Control* control) { if (find_result == render_objects.cend()) { throw std::logic_error("Control is not a child of FlexLayout."); } - int position = find_result - render_objects.cbegin(); + int position = static_cast(find_result - render_objects.cbegin()); return *(render_object_->GetChildLayoutData(position)); } @@ -35,7 +35,7 @@ void FlexLayout::SetChildLayoutData(Control* control, if (find_result == render_objects.cend()) { throw std::logic_error("Control is not a child of FlexLayout."); } - int position = find_result - render_objects.cbegin(); + int position = static_cast(find_result - render_objects.cbegin()); const auto d = render_object_->GetChildLayoutData(position); *d = data; if (const auto window = GetWindow()) window->InvalidateLayout(); -- cgit v1.2.3