mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-30 14:14:31 +00:00
os: make nitpicker compatible to C++20
Avoid arithmetics on enum values, disambiguate '==' operator of handle_registry. Fixes #4875
This commit is contained in:
parent
f679864c23
commit
604d6bf567
@ -55,7 +55,7 @@ struct Framebuffer::Session : Genode::Session
|
|||||||
* session-object allocation, a dataspace capability for the framebuffer
|
* session-object allocation, a dataspace capability for the framebuffer
|
||||||
* dataspace, and its session capability.
|
* dataspace, and its session capability.
|
||||||
*/
|
*/
|
||||||
enum { CAP_QUOTA = 3 };
|
static constexpr unsigned CAP_QUOTA = 3;
|
||||||
|
|
||||||
typedef Session_client Client;
|
typedef Session_client Client;
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@ struct Gui::Session : Genode::Session
|
|||||||
* for the command buffer, and the capabilities needed for the aggregated
|
* for the command buffer, and the capabilities needed for the aggregated
|
||||||
* 'Framebuffer' and 'Input' sessions.
|
* 'Framebuffer' and 'Input' sessions.
|
||||||
*/
|
*/
|
||||||
enum { CAP_QUOTA = Framebuffer::Session::CAP_QUOTA
|
static constexpr unsigned CAP_QUOTA = Framebuffer::Session::CAP_QUOTA
|
||||||
+ Input::Session::CAP_QUOTA + 3 };
|
+ Input::Session::CAP_QUOTA + 3;
|
||||||
|
|
||||||
typedef Session_client Client;
|
typedef Session_client Client;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ struct Input::Session : Genode::Session
|
|||||||
* session-object allocation, a dataspace capability for the input
|
* session-object allocation, a dataspace capability for the input
|
||||||
* buffer, and its session capability.
|
* buffer, and its session capability.
|
||||||
*/
|
*/
|
||||||
enum { CAP_QUOTA = 3 };
|
static constexpr unsigned CAP_QUOTA = 3;
|
||||||
|
|
||||||
virtual ~Session() { }
|
virtual ~Session() { }
|
||||||
|
|
||||||
|
@ -81,6 +81,8 @@ class Genode::Handle_registry
|
|||||||
HANDLE(id), Weak_ptr<OBJ>(weak_ptr)
|
HANDLE(id), Weak_ptr<OBJ>(weak_ptr)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
using Weak_ptr<OBJ>::operator ==;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Avl_node interface
|
* Avl_node interface
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user