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

AK: Run clang-format on Atomic.h

Also use <AK/Types.h> instead of <stddef.h>
This commit is contained in:
Andreas Kling 2020-01-12 18:44:51 +01:00
parent f3eb06a46f
commit 61e6b1fb7c

View file

@ -1,13 +1,10 @@
#pragma once
#ifndef KERNEL
#include <stddef.h>
#endif
#include <AK/Types.h>
namespace AK {
enum MemoryOrder
{
enum MemoryOrder {
memory_order_relaxed = __ATOMIC_RELAXED,
memory_order_consume = __ATOMIC_CONSUME,
memory_order_acquire = __ATOMIC_ACQUIRE,
@ -17,8 +14,7 @@ enum MemoryOrder
};
template<typename T>
class Atomic
{
class Atomic {
T m_value { 0 };
public:
@ -26,8 +22,8 @@ public:
Atomic(const Atomic&) = delete;
Atomic& operator=(const Atomic&) volatile = delete;
Atomic(T val) noexcept:
m_value(val)
Atomic(T val) noexcept
: m_value(val)
{
}
@ -141,10 +137,8 @@ public:
}
};
template<typename T>
class Atomic<T*>
{
class Atomic<T*> {
T* m_value { nullptr };
public:
@ -152,8 +146,8 @@ public:
Atomic(const Atomic&) = delete;
Atomic& operator=(const Atomic&) volatile = delete;
Atomic(T* val) noexcept:
m_value(val)
Atomic(T* val) noexcept
: m_value(val)
{
}