aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-01-18 08:55:10 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-01-18 08:57:06 +0100
commitb17b629df44dbc888f6b6bee79d0d13d662371cf (patch)
tree61ebad6d2e3e57e54dea9ee1bca4ac06f6c7db1f
parentaaa57e0e458435e23047fcb325872f0350171bad (diff)
downloadlibquotient-b17b629df44dbc888f6b6bee79d0d13d662371cf.tar.gz
libquotient-b17b629df44dbc888f6b6bee79d0d13d662371cf.zip
Add [[maybe_unused]] to things the lib doesn't use
-rw-r--r--lib/function_traits.cpp2
-rw-r--r--lib/quotient_common.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/function_traits.cpp b/lib/function_traits.cpp
index 20bcf30e..6542101a 100644
--- a/lib/function_traits.cpp
+++ b/lib/function_traits.cpp
@@ -47,7 +47,7 @@ static_assert(std::is_same_v<fn_arg_t<Fo1>, int>,
"Test fn_arg_t defaulting to first argument");
template <typename T>
-static void ft(const std::vector<T>&);
+[[maybe_unused]] static void ft(const std::vector<T>&);
static_assert(
std::is_same<fn_arg_t<decltype(ft<double>)>, const std::vector<double>&>(),
"Test function templates");
diff --git a/lib/quotient_common.h b/lib/quotient_common.h
index af3e2730..02a9f0cd 100644
--- a/lib/quotient_common.h
+++ b/lib/quotient_common.h
@@ -95,7 +95,7 @@ enum class JoinState : std::underlying_type_t<Membership> {
};
QUO_DECLARE_FLAGS_NS(JoinStates, JoinState)
-constexpr auto JoinStateStrings = make_array(
+[[maybe_unused]] constexpr auto JoinStateStrings = make_array(
MembershipStrings[0], MembershipStrings[1], MembershipStrings[2],
MembershipStrings[3] /* same as MembershipStrings, sans "ban" */
);
@@ -125,7 +125,7 @@ enum RoomType {
};
Q_ENUM_NS(RoomType)
-constexpr auto RoomTypeStrings = make_array("m.space");
+[[maybe_unused]] constexpr auto RoomTypeStrings = make_array("m.space");
} // namespace Quotient
Q_DECLARE_OPERATORS_FOR_FLAGS(Quotient::MembershipMask)