1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

Meta+AK: Make clang-format-10 clean

This commit is contained in:
Ben Wiederhake 2020-09-18 09:49:51 +02:00 committed by Andreas Kling
parent 468a29f4a1
commit 8940bc3503
28 changed files with 315 additions and 313 deletions

View file

@ -85,7 +85,6 @@ template<typename T, typename V = typename RemoveVolatile<T>::Type>
return __atomic_compare_exchange_n(const_cast<V**>(var), &expected, nullptr, false, order, order); return __atomic_compare_exchange_n(const_cast<V**>(var), &expected, nullptr, false, order, order);
} }
template<typename T> template<typename T>
static inline T atomic_fetch_add(volatile T* var, T val, MemoryOrder order = memory_order_seq_cst) noexcept static inline T atomic_fetch_add(volatile T* var, T val, MemoryOrder order = memory_order_seq_cst) noexcept
{ {

View file

@ -43,4 +43,3 @@ class Badge {
} }
using AK::Badge; using AK::Badge;

View file

@ -276,7 +276,6 @@ void GenericLexer::ignore_until(Condition condition)
m_index++; m_index++;
} }
bool is_control(char c) bool is_control(char c)
{ {
return (c >= 0 && c <= 31) || c == 127; return (c >= 0 && c <= 31) || c == 127;

View file

@ -26,8 +26,8 @@
#pragma once #pragma once
#include <stdlib.h>
#include <AK/HashTable.h> #include <AK/HashTable.h>
#include <stdlib.h>
namespace AK { namespace AK {

View file

@ -26,14 +26,13 @@
#pragma once #pragma once
#include <AK/NonnullPtrVector.h>
#include <AK/NonnullOwnPtr.h> #include <AK/NonnullOwnPtr.h>
#include <AK/NonnullPtrVector.h>
namespace AK { namespace AK {
template<typename T, int inline_capacity = 0> template<typename T, int inline_capacity = 0>
class NonnullOwnPtrVector : public NonnullPtrVector<NonnullOwnPtr<T>, inline_capacity> class NonnullOwnPtrVector : public NonnullPtrVector<NonnullOwnPtr<T>, inline_capacity> {
{
}; };
} }

View file

@ -32,8 +32,7 @@
namespace AK { namespace AK {
template<typename T, int inline_capacity = 0> template<typename T, int inline_capacity = 0>
class NonnullRefPtrVector : public NonnullPtrVector<NonnullRefPtr<T>, inline_capacity> class NonnullRefPtrVector : public NonnullPtrVector<NonnullRefPtr<T>, inline_capacity> {
{
}; };
} }

View file

@ -88,4 +88,3 @@ private:
} }
using AK::Queue; using AK::Queue;

View file

@ -32,7 +32,8 @@
namespace AK { namespace AK {
template<typename ValueType, typename ErrorType> template<typename ValueType, typename ErrorType>
class [[nodiscard]] Result { class [[nodiscard]] Result
{
public: public:
Result(const ValueType& res) Result(const ValueType& res)
: m_result(res) : m_result(res)
@ -50,13 +51,19 @@ public:
{ {
} }
// FIXME: clang-format gets confused about Result. Why?
// clang-format off
Result(Result&& other) Result(Result&& other)
// clang-format on
: m_result(move(other.m_result)) : m_result(move(other.m_result))
, m_error(move(other.m_error)) , m_error(move(other.m_error))
{ {
} }
// FIXME: clang-format gets confused about Result. Why?
// clang-format off
Result(Result& other) Result(Result& other)
// clang-format on
: m_result(other.m_result) : m_result(other.m_result)
, m_error(other.m_error) , m_error(other.m_error)
{ {

View file

@ -70,5 +70,5 @@ private:
} }
using AK::ScopeGuard;
using AK::ArmedScopeGuard; using AK::ArmedScopeGuard;
using AK::ScopeGuard;

View file

@ -51,6 +51,7 @@ template<typename T, T* (*InitFunction)() = SingletonInstanceCreator<T>::create>
class Singleton { class Singleton {
AK_MAKE_NONCOPYABLE(Singleton); AK_MAKE_NONCOPYABLE(Singleton);
AK_MAKE_NONMOVABLE(Singleton); AK_MAKE_NONMOVABLE(Singleton);
public: public:
Singleton() = default; Singleton() = default;

View file

@ -26,8 +26,8 @@
#include <AK/TestSuite.h> #include <AK/TestSuite.h>
#include <AK/String.h>
#include <AK/Optional.h> #include <AK/Optional.h>
#include <AK/String.h>
TEST_CASE(basic_optional) TEST_CASE(basic_optional)
{ {

View file

@ -26,8 +26,8 @@
#include <AK/TestSuite.h> #include <AK/TestSuite.h>
#include <AK/String.h>
#include <AK/Queue.h> #include <AK/Queue.h>
#include <AK/String.h>
TEST_CASE(construct) TEST_CASE(construct)
{ {