dialog: let 'Scope::widget' take 'hosted' as const

This eases the use of temporary 'Hosted' objects. The 'view' code path
is not expected to modify any state.

Issue #5008
Issue #5053
This commit is contained in:
Norman Feske 2023-11-06 17:45:02 +01:00 committed by Christian Helmuth
parent 1aba8182a4
commit ec60011852

View File

@ -260,7 +260,7 @@ struct Dialog::Scope : Noncopyable
} }
template <typename HOSTED, typename... ARGS> template <typename HOSTED, typename... ARGS>
void widget(HOSTED &hosted, ARGS &&... args) void widget(HOSTED const &hosted, ARGS &&... args)
{ {
hosted._view_hosted(*this, args...); hosted._view_hosted(*this, args...);
} }