Struct exposed to .60 as struct need to be layed out in alphabetical order

because that's the order in which the C++ code generator pass the argument
to the agregate initialization
This commit is contained in:
Olivier Goffart 2021-09-03 17:52:03 +02:00 committed by Olivier Goffart
parent dedc9b3b9b
commit 619ce6c4f7
3 changed files with 12 additions and 14 deletions

View file

@ -379,10 +379,10 @@ using cbindgen_private::sixtyfps_solve_path_layout;
inline LayoutInfo LayoutInfo::merge(const LayoutInfo &other) const
{
// Note: This "logic" is duplicated from LayoutInfo::merge in layout.rs.
return LayoutInfo { std::max(min, other.min),
std::min(max, other.max),
std::max(min_percent, other.min_percent),
return LayoutInfo { std::min(max, other.max),
std::min(max_percent, other.max_percent),
std::max(min, other.min),
std::max(min_percent, other.min_percent),
std::max(preferred, other.preferred),
std::min(stretch, other.stretch) };
}