From b050b744be4c35cb6743e2e4d55935fdff56a01b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 30 May 2024 16:28:20 -0400 Subject: gdb, gdbsupport: use `using` in enum flags code I think that `using` is easier to read than `typedef`, and it's the modern C++ thing anyway. Change-Id: Iccb62dc3869cddfb6a684ef3023dcd5b799f3ab2 --- gdb/unittests/enum-flags-selftests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/unittests') diff --git a/gdb/unittests/enum-flags-selftests.c b/gdb/unittests/enum-flags-selftests.c index b55d8c3..154a473 100644 --- a/gdb/unittests/enum-flags-selftests.c +++ b/gdb/unittests/enum-flags-selftests.c @@ -85,7 +85,7 @@ static EF ef ATTRIBUTE_UNUSED; #define CHECK_VALID(VALID, EXPR_TYPE, EXPR) \ CHECK_VALID_EXPR_6 (EF, RE, EF2, RE2, UEF, URE, VALID, EXPR_TYPE, EXPR) -typedef std::underlying_type::type und; +using und = std::underlying_type::type; /* Test construction / conversion from/to different types. */ @@ -253,7 +253,7 @@ CHECK_VALID (true, int, true ? RE2 () : EF ()) /* Same, but with an unsigned enum. */ -typedef unsigned int uns; +using uns = unsigned int; CHECK_VALID (true, uns, true ? EF () : UEF ()) CHECK_VALID (true, uns, true ? UEF () : EF ()) -- cgit v1.1