From c4b8fae563cc5cc574607a0c24c98b711ddab37e Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 16 May 2023 08:09:56 +0200 Subject: [PATCH] launchpad: fix build errors with `-std=gnu++20` Fixes #4884 --- repos/demo/src/app/launchpad/child_entry.h | 10 +++++----- repos/demo/src/app/launchpad/launch_entry.h | 6 +++--- repos/demo/src/app/launchpad/section.h | 4 ++-- repos/demo/src/app/launchpad/status_entry.h | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/repos/demo/src/app/launchpad/child_entry.h b/repos/demo/src/app/launchpad/child_entry.h index e308dd5bb6..aab8098abe 100644 --- a/repos/demo/src/app/launchpad/child_entry.h +++ b/repos/demo/src/app/launchpad/child_entry.h @@ -67,11 +67,11 @@ class Child_entry : public Scout::Parent_element, friend class Genode::List >; - enum { _IW = 16 }; /* icon width */ - enum { _IH = 16 }; /* icon height */ - enum { _PTW = 100 }; /* program text width */ - enum { _PADX = 10 }; /* horizontal padding */ - enum { _NAME_LEN = 64 }; /* max length of child name */ + static constexpr int _IW = 16; /* icon width */ + static constexpr int _IH = 16; /* icon height */ + static constexpr int _PTW = 100; /* program text width */ + static constexpr int _PADX = 10; /* horizontal padding */ + static constexpr int _NAME_LEN = 64; /* max length of child name */ Scout::Block _block; Kbyte_loadbar _loadbar; diff --git a/repos/demo/src/app/launchpad/launch_entry.h b/repos/demo/src/app/launchpad/launch_entry.h index 34186c9fc1..db44ffdf75 100644 --- a/repos/demo/src/app/launchpad/launch_entry.h +++ b/repos/demo/src/app/launchpad/launch_entry.h @@ -29,9 +29,9 @@ class Launch_entry : public Scout::Parent_element, public Loadbar_listener Scout::Launcher _launcher; int _lh = 0; /* launch entry height */ - enum { _PTW = 100 }; /* program text width */ - enum { _PADX = 10 }; /* program text width */ - enum { _PADR = 16 }; /* right padding */ + static constexpr int _PTW = 100; /* program text width */ + static constexpr int _PADX = 10; /* program text width */ + static constexpr int _PADR = 16; /* right padding */ public: diff --git a/repos/demo/src/app/launchpad/section.h b/repos/demo/src/app/launchpad/section.h index 15923e8adf..3943fe1836 100644 --- a/repos/demo/src/app/launchpad/section.h +++ b/repos/demo/src/app/launchpad/section.h @@ -30,8 +30,8 @@ class Section : public Scout::Parent_element Section(Section const &); Section &operator = (Section const &); - enum { _SH = 8 }; /* shadow height */ - enum { _STH = 20 }; /* shadow height */ + static constexpr int _SH = 8; /* shadow height */ + static constexpr int _STH = 20; /* shadow height */ Scout::Horizontal_shadow _bg; Scout::Horizontal_shadow _shadow; diff --git a/repos/demo/src/app/launchpad/status_entry.h b/repos/demo/src/app/launchpad/status_entry.h index 1fe7c99888..ea0d7ff610 100644 --- a/repos/demo/src/app/launchpad/status_entry.h +++ b/repos/demo/src/app/launchpad/status_entry.h @@ -25,9 +25,9 @@ class Status_entry : public Scout::Parent_element Kbyte_loadbar _loadbar; int _lh = 0; /* launch entry height */ - enum { _PTW = 100 }; /* program text width */ - enum { _PADX = 10 }; /* horizontal padding */ - enum { _PADR = 16 }; /* right padding */ + static constexpr int _PTW = 100; /* program text width */ + static constexpr int _PADX = 10; /* horizontal padding */ + static constexpr int _PADR = 16; /* right padding */ public: