From 4b0518e991752586184b44133159d2f1cb9fe84a Mon Sep 17 00:00:00 2001 From: lizzie Date: Sat, 9 Aug 2025 02:11:52 +0100 Subject: [PATCH] [common] Use U8 for colour of RB-tree instead of integer to save space Signed-off-by: lizzie --- src/common/tree.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/tree.h b/src/common/tree.h index f4fc43de36..a7b59c501f 100644 --- a/src/common/tree.h +++ b/src/common/tree.h @@ -1,3 +1,5 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: 2002 Niels Provos // SPDX-License-Identifier: BSD-2-Clause @@ -21,9 +23,11 @@ * The maximum height of a red-black tree is 2lg (n+1). */ +#include + namespace Common::freebsd { -enum class RBColor { +enum class RBColor : std::uint8_t { RB_BLACK = 0, RB_RED = 1, };