launchpad: Fix _spacer member initialization.

The Scout::Spacer constructor requires two arguments. The initialization
of the type in Launchpad_window declaration does not specify them. The
variable is however initialized a second time in class constructor. This is
most likely why GCC accepts this code. Clang on the other hand
complains about it.

Fix this by properly initializing both _spacer and _docview only once at
declaration time.

Issue #3985
This commit is contained in:
Piotr Tworek 2021-01-12 01:31:57 +01:00 committed by Norman Feske
parent ffb931f8b1
commit d475015ada
2 changed files with 2 additions and 4 deletions

View File

@ -42,8 +42,6 @@ Launchpad_window<PT>::Launchpad_window(Genode::Env &env,
:
Launchpad(env, initial_quota),
Window(gfx_backend, position, size, max_size, false),
_docview(0),
_spacer(1, _TH),
_info_section("Status", &subsection_font),
_launch_section("Launcher", &subsection_font),
_kiddy_section("Children", &subsection_font),

View File

@ -64,8 +64,8 @@ class Launchpad_window : public Scout::Scrollbar_listener,
Scout::Fade_icon<PT, 32, 32> _sizer { };
Scout::Scrollbar<PT> _scrollbar { };
Genode::List<Child_entry<PT> > _child_entry_list { };
Scout::Docview _docview { };
Scout::Spacer _spacer { };
Scout::Docview _docview { 0 };
Scout::Spacer _spacer { 1, _TH };
Scout::Document _document { };
Section<PT> _info_section { };