diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-02 19:59:40 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-02 19:59:40 +0900 |
commit | c05ade838f0fce81f2bbe80a3295618a8a26ff52 (patch) | |
tree | 763340439a0f4034e9c829d76cb1ffe9766b83c5 /lib/util.cpp | |
parent | 1a1ea8fc87e827fa44c80ff30277e3bee62f4ebb (diff) | |
download | libquotient-c05ade838f0fce81f2bbe80a3295618a8a26ff52.tar.gz libquotient-c05ade838f0fce81f2bbe80a3295618a8a26ff52.zip |
Apply the new brace wrapping to source files
Diffstat (limited to 'lib/util.cpp')
-rw-r--r-- | lib/util.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/util.cpp b/lib/util.cpp index 9e0807c6..1919e811 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -124,7 +124,8 @@ QString QMatrixClient::serverPart(const QString& mxId) % ServerPartRegEx % ")$"; static QRegularExpression parser( re, - QRegularExpression::UseUnicodePropertiesOption); // Because Asian digits + QRegularExpression::UseUnicodePropertiesOption); // Because Asian + // digits return parser.match(mxId).captured(1); } @@ -148,16 +149,14 @@ void f2(int, QString); static_assert(std::is_same<fn_arg_t<decltype(f2), 1>, QString>::value, "Test fn_arg_t<>"); -struct S -{ +struct S { int mf(); }; static_assert(is_callable_v<decltype(&S::mf)>, "Test member function"); static_assert(returns<int, decltype(&S::mf)>(), "Test returns<> with member function"); -struct Fo -{ +struct Fo { int operator()(); }; static_assert(is_callable_v<Fo>, "Test is_callable<> with function object"); @@ -165,8 +164,7 @@ static_assert(function_traits<Fo>::arg_number == 0, "Test function object"); static_assert(std::is_same<fn_return_t<Fo>, int>::value, "Test return type of function object"); -struct Fo1 -{ +struct Fo1 { void operator()(int); }; static_assert(function_traits<Fo1>::arg_number == 1, "Test function object 1"); @@ -182,13 +180,11 @@ static_assert(std::is_same<fn_return_t<decltype(l)>, int>::value, #endif template <typename T> -struct fn_object -{ +struct fn_object { static int smf(double) { return 0; } }; template <> -struct fn_object<QString> -{ +struct fn_object<QString> { void operator()(QString); }; static_assert(is_callable_v<fn_object<QString>>, "Test function object"); |