mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
Everywhere: Remove 'clang-format off' comments that are no longer needed
https://github.com/SerenityOS/serenity/pull/15654#issuecomment-1322554496
This commit is contained in:
parent
d26aabff04
commit
babfc13c84
7 changed files with 1 additions and 21 deletions
|
@ -210,10 +210,8 @@ public:
|
||||||
return m_ptr == other;
|
return m_ptr == other;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
private:
|
private:
|
||||||
NonnullRefPtr() = delete;
|
NonnullRefPtr() = delete;
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
ALWAYS_INLINE RETURNS_NONNULL T* as_nonnull_ptr() const
|
ALWAYS_INLINE RETURNS_NONNULL T* as_nonnull_ptr() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,8 +76,6 @@
|
||||||
# define AK_OS_WINDOWS
|
# define AK_OS_WINDOWS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// FIXME: Remove clang-format suppression after https://github.com/llvm/llvm-project/issues/56602 resolved
|
|
||||||
// clang-format off
|
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
# define STR(x) __STR(x)
|
# define STR(x) __STR(x)
|
||||||
# define __STR(x) #x
|
# define __STR(x) #x
|
||||||
|
@ -89,7 +87,6 @@
|
||||||
# undef __STR
|
# undef __STR
|
||||||
# define AK_OS_ANDROID
|
# define AK_OS_ANDROID
|
||||||
#endif
|
#endif
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
#if defined(__EMSCRIPTEN__)
|
#if defined(__EMSCRIPTEN__)
|
||||||
# define AK_OS_EMSCRIPTEN
|
# define AK_OS_EMSCRIPTEN
|
||||||
|
|
|
@ -30,10 +30,6 @@ requires(AK::Detail::IsIntegral<T>)
|
||||||
return value && !((value) & (value - 1));
|
return value && !((value) & (value - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK: clang-format does not format this correctly because of the requires clause above.
|
|
||||||
// Disabling formatting for that doesn't help either.
|
|
||||||
//
|
|
||||||
// clang-format off
|
|
||||||
#ifndef AK_DONT_REPLACE_STD
|
#ifndef AK_DONT_REPLACE_STD
|
||||||
namespace std { // NOLINT(cert-dcl58-cpp) Names in std to aid tools
|
namespace std { // NOLINT(cert-dcl58-cpp) Names in std to aid tools
|
||||||
|
|
||||||
|
@ -60,9 +56,8 @@ constexpr T&& move(T& arg)
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#include <utility>
|
# include <utility>
|
||||||
#endif
|
#endif
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
using std::forward;
|
using std::forward;
|
||||||
using std::move;
|
using std::move;
|
||||||
|
|
|
@ -216,10 +216,8 @@ public:
|
||||||
other.exchange(ptr);
|
other.exchange(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
private:
|
private:
|
||||||
NonnullLockRefPtr() = delete;
|
NonnullLockRefPtr() = delete;
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
ALWAYS_INLINE T* as_ptr() const
|
ALWAYS_INLINE T* as_ptr() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -183,12 +183,9 @@ static constexpr Array<Span<@type@ const>, @size@ + 1> @name@ { {
|
||||||
)~~~");
|
)~~~");
|
||||||
}
|
}
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
// clang-format gets confused by the requires() clauses above, and formats this section very weirdly.
|
|
||||||
protected:
|
protected:
|
||||||
Vector<StorageType> m_storage;
|
Vector<StorageType> m_storage;
|
||||||
HashMap<StorageType, size_t> m_storage_indices;
|
HashMap<StorageType, size_t> m_storage_indices;
|
||||||
// clang-format on
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class UniqueStringStorage : public UniqueStorage<String> {
|
class UniqueStringStorage : public UniqueStorage<String> {
|
||||||
|
|
|
@ -41,12 +41,10 @@ namespace Core {
|
||||||
// This class is designed to be transferred over IPC and mmap()ed into multiple processes' memory.
|
// This class is designed to be transferred over IPC and mmap()ed into multiple processes' memory.
|
||||||
// It is a synthetic pointer to the actual shared memory, which is abstracted away from the user.
|
// It is a synthetic pointer to the actual shared memory, which is abstracted away from the user.
|
||||||
// FIXME: Make this independent of shared memory, so that we can move it to AK.
|
// FIXME: Make this independent of shared memory, so that we can move it to AK.
|
||||||
// clang-format off
|
|
||||||
template<typename T, size_t Size = 32>
|
template<typename T, size_t Size = 32>
|
||||||
// Size must be a power of two, which speeds up the modulus operations for indexing.
|
// Size must be a power of two, which speeds up the modulus operations for indexing.
|
||||||
requires(popcount(Size) == 1)
|
requires(popcount(Size) == 1)
|
||||||
class SharedSingleProducerCircularQueue final {
|
class SharedSingleProducerCircularQueue final {
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using ValueType = T;
|
using ValueType = T;
|
||||||
|
|
|
@ -2540,8 +2540,6 @@ Optional<ECMA262Parser::PropertyEscape> ECMA262Parser::read_unicode_property_esc
|
||||||
{
|
{
|
||||||
consume(TokenType::LeftCurly, Error::InvalidPattern);
|
consume(TokenType::LeftCurly, Error::InvalidPattern);
|
||||||
|
|
||||||
// Note: clang-format is disabled here because it doesn't handle templated lambdas yet.
|
|
||||||
// clang-format off
|
|
||||||
auto read_until = [&]<typename... Ts>(Ts&&... terminators) {
|
auto read_until = [&]<typename... Ts>(Ts&&... terminators) {
|
||||||
auto start_token = m_parser_state.current_token;
|
auto start_token = m_parser_state.current_token;
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
|
@ -2554,7 +2552,6 @@ Optional<ECMA262Parser::PropertyEscape> ECMA262Parser::read_unicode_property_esc
|
||||||
|
|
||||||
return StringView { start_token.value().characters_without_null_termination(), offset };
|
return StringView { start_token.value().characters_without_null_termination(), offset };
|
||||||
};
|
};
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
StringView property_type;
|
StringView property_type;
|
||||||
StringView property_name = read_until("="sv, "}"sv);
|
StringView property_name = read_until("="sv, "}"sv);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue