mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17:35 +00:00
Everywhere: Re-format with clang-format-11
Compared to version 10 this fixes a bunch of formatting issues, mostly around structs/classes with attributes like [[gnu::packed]], and incorrect insertion of spaces in parameter types ("T &"/"T &&"). I also removed a bunch of // clang-format off/on and FIXME comments that are no longer relevant - on the other hand it tried to destroy a couple of neatly formatted comments, so I had to add some as well.
This commit is contained in:
parent
2568a93b5d
commit
bbe787a0af
54 changed files with 130 additions and 230 deletions
|
@ -35,8 +35,7 @@ enum KSuccessTag {
|
|||
KSuccess
|
||||
};
|
||||
|
||||
class [[nodiscard]] KResult
|
||||
{
|
||||
class [[nodiscard]] KResult {
|
||||
public:
|
||||
ALWAYS_INLINE explicit KResult(int negative_e)
|
||||
: m_error(negative_e)
|
||||
|
@ -62,8 +61,7 @@ private:
|
|||
};
|
||||
|
||||
template<typename T>
|
||||
class alignas(T) [[nodiscard]] KResultOr
|
||||
{
|
||||
class alignas(T) [[nodiscard]] KResultOr {
|
||||
public:
|
||||
KResultOr(KResult error)
|
||||
: m_error(error)
|
||||
|
@ -71,20 +69,14 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
// FIXME: clang-format gets confused about T. Why?
|
||||
// clang-format off
|
||||
ALWAYS_INLINE KResultOr(T&& value)
|
||||
// clang-format on
|
||||
{
|
||||
new (&m_storage) T(move(value));
|
||||
m_have_storage = true;
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
// FIXME: clang-format gets confused about U. Why?
|
||||
// clang-format off
|
||||
ALWAYS_INLINE KResultOr(U&& value)
|
||||
// clang-format on
|
||||
{
|
||||
new (&m_storage) T(move(value));
|
||||
m_have_storage = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue