diff options
author | 杨宇千 <crupest@outlook.com> | 2019-09-15 17:06:34 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-09-15 17:06:34 +0800 |
commit | 574e69fb379cd54fc3034fe45a155e770435b97d (patch) | |
tree | 96fab3a1db66fa974a135e777778e56a861745bc /src/ui/controls/flex_layout.cpp | |
parent | 55d98d3259e9f3e184ad6323d1d49d298bd1723b (diff) | |
download | cru-574e69fb379cd54fc3034fe45a155e770435b97d.tar.gz cru-574e69fb379cd54fc3034fe45a155e770435b97d.tar.bz2 cru-574e69fb379cd54fc3034fe45a155e770435b97d.zip |
...
Diffstat (limited to 'src/ui/controls/flex_layout.cpp')
-rw-r--r-- | src/ui/controls/flex_layout.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<int>(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<int>(find_result - render_objects.cbegin()); const auto d = render_object_->GetChildLayoutData(position); *d = data; if (const auto window = GetWindow()) window->InvalidateLayout(); |