aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/flex_layout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/controls/flex_layout.cpp')
-rw-r--r--src/ui/controls/flex_layout.cpp4
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();