aboutsummaryrefslogtreecommitdiff
path: root/gdb/unittests
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-05-30 16:28:20 -0400
committerSimon Marchi <simon.marchi@efficios.com>2024-08-12 10:58:49 -0400
commitb050b744be4c35cb6743e2e4d55935fdff56a01b (patch)
treebe5e000e6b3ede9e27fd132e5dfa23c73dde9f54 /gdb/unittests
parent66673ad2e4574db3a65e25b307ad41bbcb165dc2 (diff)
downloadgdb-b050b744be4c35cb6743e2e4d55935fdff56a01b.zip
gdb-b050b744be4c35cb6743e2e4d55935fdff56a01b.tar.gz
gdb-b050b744be4c35cb6743e2e4d55935fdff56a01b.tar.bz2
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
Diffstat (limited to 'gdb/unittests')
-rw-r--r--gdb/unittests/enum-flags-selftests.c4
1 files changed, 2 insertions, 2 deletions
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<RE>::type und;
+using und = std::underlying_type<RE>::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 ())