diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-18 08:54:52 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-18 08:55:23 +0100 |
commit | bd280a087ecab30f94f7937513ee298c233fcba1 (patch) | |
tree | 1209c5adc664e81e664b6be95f45dad86facdcf0 /lib/quotient_common.h | |
parent | bc4a0f5d408d901f3c8f4dfeec0574ded04845bf (diff) | |
download | libquotient-bd280a087ecab30f94f7937513ee298c233fcba1.tar.gz libquotient-bd280a087ecab30f94f7937513ee298c233fcba1.zip |
Revise inline keyword usage
- Templates and constexpr imply inline
- A function called from a single site better be inlined.
Diffstat (limited to 'lib/quotient_common.h')
-rw-r--r-- | lib/quotient_common.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/quotient_common.h b/lib/quotient_common.h index 3d38ce1f..af3e2730 100644 --- a/lib/quotient_common.h +++ b/lib/quotient_common.h @@ -77,7 +77,7 @@ enum class Membership : unsigned int { }; QUO_DECLARE_FLAGS_NS(MembershipMask, Membership) -constexpr inline auto MembershipStrings = make_array( +constexpr auto MembershipStrings = make_array( // The order MUST be the same as the order in the original enum "join", "leave", "invite", "knock", "ban"); @@ -95,7 +95,7 @@ enum class JoinState : std::underlying_type_t<Membership> { }; QUO_DECLARE_FLAGS_NS(JoinStates, JoinState) -constexpr inline auto JoinStateStrings = make_array( +constexpr auto JoinStateStrings = make_array( MembershipStrings[0], MembershipStrings[1], MembershipStrings[2], MembershipStrings[3] /* same as MembershipStrings, sans "ban" */ ); @@ -125,9 +125,7 @@ enum RoomType { }; Q_ENUM_NS(RoomType) -constexpr inline auto RoomTypeStrings = make_array( - "m.space" -); +constexpr auto RoomTypeStrings = make_array("m.space"); } // namespace Quotient Q_DECLARE_OPERATORS_FOR_FLAGS(Quotient::MembershipMask) |