Fix build with Xcode.

This commit is contained in:
John Preston
2023-02-27 22:05:10 +04:00
parent ce0e07d332
commit a01f74ecdc
3 changed files with 6 additions and 2 deletions
@@ -563,7 +563,10 @@ template <typename Flags>
{ entry.icon });
const auto toggle = Ui::CreateChild<Ui::RpWidget>(
button.get());
auto &lifetime = toggle->lifetime();
// Looks like a bug in Clang, fails to compile with 'auto&' below.
rpl::lifetime &lifetime = toggle->lifetime();
const auto checkView = lifetime.make_state<Ui::ToggleView>(
st.toggle,
toggled,