From bdfe6c2c4530830376bfbcbd83fa7b20e434046f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 23 Jul 2020 16:23:43 +0200 Subject: [PATCH] lib/dbus/Values: use `using` instead of `typedef` --- src/lib/dbus/Values.hxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/lib/dbus/Values.hxx b/src/lib/dbus/Values.hxx index 5511400f5..aac5b9dc4 100644 --- a/src/lib/dbus/Values.hxx +++ b/src/lib/dbus/Values.hxx @@ -48,20 +48,20 @@ struct BasicValue { const T &value; explicit constexpr BasicValue(const T &_value) noexcept - :value(_value) {} + :value(_value) {} }; struct String : BasicValue { explicit constexpr String(const char *const&_value) noexcept - :BasicValue(_value) {} + :BasicValue(_value) {} }; struct Boolean { - typedef BooleanTypeTraits Traits; + using Traits = BooleanTypeTraits; dbus_bool_t value; explicit constexpr Boolean(bool _value) noexcept - :value(_value) {} + :value(_value) {} }; using Uint32 = BasicValue; @@ -69,21 +69,21 @@ using Uint64 = BasicValue; template class WrapTraits> struct WrapValue { - typedef typename T::Traits ContainedTraits; - typedef WrapTraits Traits; + using ContainedTraits = typename T::Traits; + using Traits = WrapTraits; const T &value; explicit constexpr WrapValue(const T &_value) noexcept - :value(_value) {} + :value(_value) {} }; template struct WrapVariant : BasicValue { - typedef typename T::Traits ContainedTraits; - typedef VariantTypeTraits Traits; + using ContainedTraits = typename T::Traits; + using Traits = VariantTypeTraits; explicit constexpr WrapVariant(const T &_value) noexcept - :BasicValue(_value) {} + :BasicValue(_value) {} }; template @@ -93,13 +93,13 @@ static WrapVariant Variant(const T &_value) noexcept { template struct WrapFixedArray { - typedef TypeTraits ContainedTraits; - typedef ArrayTypeTraits Traits; + using ContainedTraits = TypeTraits; + using Traits = ArrayTypeTraits; ConstBuffer value; explicit constexpr WrapFixedArray(const T *_data, size_t _size) noexcept - :value(_data, _size) {} + :value(_data, _size) {} }; template @@ -110,12 +110,12 @@ static WrapFixedArray FixedArray(const T *_data, template struct WrapStruct { - typedef StructTypeTraits Traits; + using Traits = StructTypeTraits; std::tuple values; explicit constexpr WrapStruct(const T&... _values) noexcept - :values(_values...) {} + :values(_values...) {} }; template