From fc01d11b8d63d453456f74fdd91cd15e855cecfa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 23 Oct 2020 11:46:26 +0200 Subject: [PATCH] odbus/Types: use `using` instead of `typedef` --- src/lib/dbus/Types.hxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/lib/dbus/Types.hxx b/src/lib/dbus/Types.hxx index 72b3d5682..331861c08 100644 --- a/src/lib/dbus/Types.hxx +++ b/src/lib/dbus/Types.hxx @@ -1,5 +1,5 @@ /* - * Copyright 2007-2017 Content Management AG + * Copyright 2007-2020 CM4all GmbH * All rights reserved. * * author: Max Kellermann @@ -42,7 +42,7 @@ namespace ODBus { template struct BasicTypeTraits { static constexpr int TYPE = type; - typedef TemplateString::CharAsString TypeAsString; + using TypeAsString = TemplateString::CharAsString; }; template @@ -70,20 +70,23 @@ using BooleanTypeTraits = BasicTypeTraits; template struct ArrayTypeTraits { - typedef T ContainedTraits; + using ContainedTraits = T; static constexpr int TYPE = DBUS_TYPE_ARRAY; - typedef TemplateString::InsertBefore TypeAsString; + using TypeAsString = + TemplateString::InsertBefore; }; template struct DictEntryTypeTraits { static constexpr int TYPE = DBUS_TYPE_DICT_ENTRY; - typedef TemplateString::Concat, + using TypeAsString = + TemplateString::Concat, typename KeyT::TypeAsString, typename ValueT::TypeAsString, - TemplateString::CharAsString> TypeAsString; + TemplateString::CharAsString>; }; using VariantTypeTraits = BasicTypeTraits; @@ -103,9 +106,10 @@ template struct StructTypeTraits { static constexpr int TYPE = DBUS_TYPE_STRUCT; - typedef TemplateString::Concat, + using TypeAsString = + TemplateString::Concat, ConcatTypeAsString, - TemplateString::CharAsString> TypeAsString; + TemplateString::CharAsString>; }; } /* namespace ODBus */