mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
Everywhere: Run clang-format
The following command was used to clang-format these files: clang-format-16 -i $(find . \ -not \( -path "./\.*" -prune \) \ -not \( -path "./Base/*" -prune \) \ -not \( -path "./Build/*" -prune \) \ -not \( -path "./Toolchain/*" -prune \) \ -not \( -path "./Ports/*" -prune \) \ -type f -name "*.cpp" -o -name "*.h")
This commit is contained in:
parent
388d455575
commit
aff81d318b
17 changed files with 49 additions and 54 deletions
|
@ -48,6 +48,7 @@ inline constexpr bool IsCallableWithArguments = requires(T t) {
|
|||
t(declval<Args>()...)
|
||||
} -> SameAs<Out>;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
using Detail::IsCallableWithArguments;
|
||||
|
|
|
@ -220,8 +220,7 @@ struct Empty {
|
|||
};
|
||||
|
||||
template<typename T>
|
||||
concept NotLvalueReference = !
|
||||
IsLvalueReference<T>;
|
||||
concept NotLvalueReference = !IsLvalueReference<T>;
|
||||
|
||||
template<NotLvalueReference... Ts>
|
||||
struct Variant
|
||||
|
|
|
@ -31,8 +31,7 @@ enum class InterruptsState;
|
|||
|
||||
// FIXME This needs to go behind some sort of platform abstraction
|
||||
// it is used between Thread and Processor.
|
||||
struct [[gnu::aligned(16)]] FPUState
|
||||
{
|
||||
struct [[gnu::aligned(16)]] FPUState {
|
||||
u8 buffer[512];
|
||||
};
|
||||
|
||||
|
|
|
@ -45,8 +45,7 @@ extern "C" void thread_context_first_enter(void);
|
|||
extern "C" void exit_kernel_thread(void);
|
||||
extern "C" void do_assume_context(Thread* thread, u32 flags);
|
||||
|
||||
struct [[gnu::aligned(64), gnu::packed]] FPUState
|
||||
{
|
||||
struct [[gnu::aligned(64), gnu::packed]] FPUState {
|
||||
SIMD::LegacyRegion legacy_region;
|
||||
SIMD::Header xsave_header;
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@ RoutingDecision route_to(IPv4Address const& target, IPv4Address const& source, R
|
|||
if (adapter == NetworkingManagement::the().loopback_adapter())
|
||||
return { adapter, adapter->mac_address() };
|
||||
|
||||
if ((target_addr & IPv4Address { 240, 0, 0, 0 }.to_u32()) == IPv4Address { 224, 0, 0, 0 }.to_u32())
|
||||
if ((target_addr & (IPv4Address { 240, 0, 0, 0 }.to_u32())) == IPv4Address { 224, 0, 0, 0 }.to_u32())
|
||||
return { adapter, multicast_ethernet_address(target) };
|
||||
|
||||
{
|
||||
|
|
|
@ -771,7 +771,7 @@ void ArgsParser::autocomplete(FILE* file, StringView program_name, ReadonlySpan<
|
|||
|
||||
// Look for a long option
|
||||
auto option_pattern = argument.substring_view(2);
|
||||
auto it = m_options.find_if([&](auto& option) { return option.hide_mode != OptionHideMode::None && StringView { option.long_name, strlen(option.long_name) } == option_pattern; });
|
||||
auto it = m_options.find_if([&](auto& option) { return (option.hide_mode != OptionHideMode::None) && StringView { option.long_name, strlen(option.long_name) } == option_pattern; });
|
||||
if (it.is_end())
|
||||
continue;
|
||||
|
||||
|
|
|
@ -560,7 +560,7 @@ void Editor::initialize()
|
|||
m_configuration.set(Configuration::NonInteractive);
|
||||
} else {
|
||||
auto* term = getenv("TERM");
|
||||
if (term != NULL && StringView { term, strlen(term) }.starts_with("xterm"sv))
|
||||
if ((term != NULL) && StringView { term, strlen(term) }.starts_with("xterm"sv))
|
||||
m_configuration.set(Configuration::Full);
|
||||
else
|
||||
m_configuration.set(Configuration::NoEscapeSequences);
|
||||
|
|
|
@ -402,7 +402,8 @@ void Printer::print(Wasm::ImportSection::Import const& import)
|
|||
{
|
||||
TemporaryChange change { m_indent, m_indent + 1 };
|
||||
import.description().visit(
|
||||
[this](auto const& type) { print(type);
|
||||
[this](auto const& type) {
|
||||
print(type);
|
||||
},
|
||||
[this](TypeIndex const& index) {
|
||||
print_indent();
|
||||
|
|
|
@ -930,11 +930,9 @@ struct InvocationOf<impl> {
|
|||
|
||||
return HostFunction(
|
||||
[&self, function_name](Configuration& configuration, Vector<Value>& arguments) -> Wasm::Result {
|
||||
Tuple args = [&]<typename... Ts, auto... Is>(IndexSequence<Is...>)
|
||||
{
|
||||
Tuple args = [&]<typename... Ts, auto... Is>(IndexSequence<Is...>) {
|
||||
return Tuple { ABI::deserialize(ABI::to_compatible_value<Ts>(arguments[Is]))... };
|
||||
}
|
||||
.template operator()<Args...>(MakeIndexSequence<sizeof...(Args)>());
|
||||
}.template operator()<Args...>(MakeIndexSequence<sizeof...(Args)>());
|
||||
|
||||
auto result = args.apply_as_args([&](auto&&... impl_args) { return (self.*impl)(configuration, impl_args...); });
|
||||
dbgln_if(WASI_DEBUG, "WASI: {}({}) = {}", function_name, arguments, result);
|
||||
|
@ -948,8 +946,7 @@ struct InvocationOf<impl> {
|
|||
if constexpr (!IsVoid<R>) {
|
||||
// Return values are passed as pointers, after the arguments
|
||||
if constexpr (requires { &R::serialize_into; }) {
|
||||
constexpr auto ResultCount = []<auto N>(void(R::*)(Array<Bytes, N>) const) { return N; }
|
||||
(&R::serialize_into);
|
||||
constexpr auto ResultCount = []<auto N>(void (R::*)(Array<Bytes, N>) const) { return N; }(&R::serialize_into);
|
||||
ABI::serialize(*value.result(), address_spans<ResultCount>(arguments.span().slice(sizeof...(Args)), configuration));
|
||||
} else {
|
||||
ABI::serialize(*value.result(), address_spans<1>(arguments.span().slice(sizeof...(Args)), configuration));
|
||||
|
|
|
@ -6246,8 +6246,7 @@ ErrorOr<RefPtr<StyleValue>> Parser::parse_filter_value_list_value(Vector<Compone
|
|||
} else if (filter_token == FilterToken::DropShadow) {
|
||||
if (!tokens.has_next_token())
|
||||
return {};
|
||||
auto next_token = [&]() -> auto&
|
||||
{
|
||||
auto next_token = [&]() -> auto& {
|
||||
auto& token = tokens.next_token();
|
||||
tokens.skip_whitespace();
|
||||
return token;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue