Skip to content

Truly independent web browser

Everywhere: Run clang-format

Timothy Flynn8178dbc83167
diff --git a/.clang-format b/.clang-format
index 420e49cbfc0..19d3abea872 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,4 +1,6 @@
+# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
+AlignAfterOpenBracket: false
AlignEscapedNewlines: Left
AlignTrailingComments:
Kind: Always
@@ -19,10 +21,12 @@ RemoveSemicolon: true
RequiresClausePosition: WithFollowing
RequiresExpressionIndentation: OuterScope
SpaceAfterTemplateKeyword: false
+SpaceInEmptyBraces: Block
WrapNamespaceBodyWithEmptyLines: Always
---
Language: ObjC
+AlignAfterOpenBracket: false
BinPackParameters: false
BraceWrapping:
AfterObjCDeclaration: true
diff --git a/AK/BinaryHeap.h b/AK/BinaryHeap.h
index 37ebf02004d..9df9c2e4212 100644
--- a/AK/BinaryHeap.h
+++ b/AK/BinaryHeap.h
@@ -169,7 +169,7 @@ private:
IntrusiveBinaryHeap<
Node,
decltype([](Node const& a, Node const& b) { return a.key < b.key; }),
- decltype([](Node&, size_t) {})>
+ decltype([](Node&, size_t) { })>
m_heap;
};
diff --git a/AK/Tuple.h b/AK/Tuple.h
index c0258fcaf92..c380a972dc0 100644
--- a/AK/Tuple.h
+++ b/AK/Tuple.h
@@ -18,7 +18,7 @@ struct Tuple {
template<typename T>
struct Tuple<T> {
Tuple(T&& value)
- requires(!IsSame<T &&, T const&>)
+ requires(!IsSame<T const&, T &&>)
: value(forward<T>(value))
{
}
diff --git a/Libraries/LibCrypto/Hash/HashManager.h b/Libraries/LibCrypto/Hash/HashManager.h
index 505da868fc0..9ec4d8b2e80 100644
--- a/Libraries/LibCrypto/Hash/HashManager.h
+++ b/Libraries/LibCrypto/Hash/HashManager.h
@@ -182,7 +182,7 @@ public:
auto size = m_pre_init_buffer.size();
if (size) {
m_algorithm.visit(
- [&](Empty&) {},
+ [&](Empty&) { },
[&](auto& hash) { hash->update(m_pre_init_buffer); });
}
m_algorithm.visit(
@@ -210,7 +210,7 @@ public:
{
m_pre_init_buffer.clear();
m_algorithm.visit(
- [&](Empty&) {},
+ [&](Empty&) { },
[&](auto& hash) { hash->reset(); });
}
diff --git a/Libraries/LibDNS/Message.cpp b/Libraries/LibDNS/Message.cpp
index 29422e12285..9475f88ecbe 100644
--- a/Libraries/LibDNS/Message.cpp
+++ b/Libraries/LibDNS/Message.cpp
@@ -1087,7 +1087,7 @@ ErrorOr<void> ResourceRecord::to_canonical_raw(ByteBuffer& buffer, DomainName co
[](Records::MX& mx) { mx.exchange = mx.exchange.canonicalized(); },
[](Records::SRV& srv) { srv.target = srv.target.canonicalized(); },
[](Records::RRSIG& rrsig) { rrsig.signers_name = rrsig.signers_name.canonicalized(); },
- [](auto&) {});
+ [](auto&) { });
return canonical.to_raw(buffer);
}
diff --git a/Libraries/LibDNS/Resolver.h b/Libraries/LibDNS/Resolver.h
index 1c91568833e..4132e82fda0 100644
--- a/Libraries/LibDNS/Resolver.h
+++ b/Libraries/LibDNS/Resolver.h
@@ -40,7 +40,7 @@ public:
re.record.record.visit(
[&](Messages::Records::A const& a) { result.append(a.address); },
[&](Messages::Records::AAAA const& aaaa) { result.append(aaaa.address); },
- [](auto&) {});
+ [](auto&) { });
}
return result;
}
diff --git a/Libraries/LibGfx/SkiaBackendContext.h b/Libraries/LibGfx/SkiaBackendContext.h
index efd0e9ebf25..76b38884d6c 100644
--- a/Libraries/LibGfx/SkiaBackendContext.h
+++ b/Libraries/LibGfx/SkiaBackendContext.h
@@ -42,7 +42,7 @@ public:
#endif
#ifdef USE_VULKAN
- static RefPtr<SkiaBackendContext> create_vulkan_context(const VulkanContext& vulkan_context);
+ static RefPtr<SkiaBackendContext> create_vulkan_context(VulkanContext const& vulkan_context);
#endif
#ifdef AK_OS_MACOS
diff --git a/Libraries/LibMedia/Containers/OggNavigator.cpp b/Libraries/LibMedia/Containers/OggNavigator.cpp
index cfd7e22a63e..5d5d40a7fac 100644
--- a/Libraries/LibMedia/Containers/OggNavigator.cpp
+++ b/Libraries/LibMedia/Containers/OggNavigator.cpp
@@ -88,8 +88,8 @@ AK::Duration OggNavigator::granule_to_time(i64 granule_position) const
void OggNavigator::reset_packet_parser_state() const
{
m_codec_data.visit(
- [](Opus const&) {},
- [](FLAC const&) {},
+ [](Opus const&) { },
+ [](FLAC const&) { },
[](Vorbis const& codec) {
codec.parser.reset();
});
diff --git a/Libraries/LibWasm/AbstractMachine/Validator.cpp b/Libraries/LibWasm/AbstractMachine/Validator.cpp
index 578967db4c3..2e76899d3f5 100644
--- a/Libraries/LibWasm/AbstractMachine/Validator.cpp
+++ b/Libraries/LibWasm/AbstractMachine/Validator.cpp
@@ -236,7 +236,7 @@ void compile_module_to_native(Module& module)
++imported_function_count;
},
[&](FunctionType const&) { ++imported_function_count; },
- [&](auto const&) {});
+ [&](auto const&) { });
}
size_t function_index = imported_function_count;
diff --git a/Libraries/LibWasm/WASI/Wasi.cpp b/Libraries/LibWasm/WASI/Wasi.cpp
index d56bc170c4d..f0cf49ec5a5 100644
--- a/Libraries/LibWasm/WASI/Wasi.cpp
+++ b/Libraries/LibWasm/WASI/Wasi.cpp
@@ -540,7 +540,7 @@ ErrorOr<Result<FileStat>> Implementation::impl$path_filestat_get(Configuration&
[&](u32 fd) {
dir_fd = fd;
},
- [](UnmappedDescriptor) {});
+ [](UnmappedDescriptor) { });
if (dir_fd < 0 && dir_fd != AT_FDCWD)
return errno_value_from_errno(errno);
@@ -603,7 +603,7 @@ ErrorOr<Result<void>> Implementation::impl$path_create_directory(Configuration&
[&](u32 fd) {
dir_fd = fd;
},
- [](UnmappedDescriptor) {});
+ [](UnmappedDescriptor) { });
if (dir_fd < 0 && dir_fd != AT_FDCWD)
return errno_value_from_errno(errno);
@@ -634,7 +634,7 @@ ErrorOr<Result<FD>> Implementation::impl$path_open(Configuration& configuration,
[&](u32 fd) {
dir_fd = fd;
},
- [](UnmappedDescriptor) {});
+ [](UnmappedDescriptor) { });
if (dir_fd < 0 && dir_fd != AT_FDCWD)
return errno_value_from_errno(errno);
@@ -725,7 +725,7 @@ ErrorOr<Result<FileStat>> Implementation::impl$fd_filestat_get(Configuration&, F
[&](u32 fd) {
resolved_fd = fd;
},
- [](UnmappedDescriptor) {});
+ [](UnmappedDescriptor) { });
if (resolved_fd < 0)
return errno_value_from_errno(errno);
@@ -806,7 +806,7 @@ ErrorOr<Result<FDStat>> Implementation::impl$fd_fdstat_get(Configuration&, FD fd
[&](u32 fd) {
resolved_fd = fd;
},
- [](UnmappedDescriptor) {});
+ [](UnmappedDescriptor) { });
if (resolved_fd < 0)
return errno_value_from_errno(errno);
diff --git a/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp b/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp
index 61c263be666..decdd83e0da 100644
--- a/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp
+++ b/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp
@@ -153,7 +153,7 @@ struct CalcResolutionSnapshot {
ffi_context.length_resolution_context = &length_resolution_context.value();
}
resolution_context.percentage_basis.visit(
- [](Empty const&) {},
+ [](Empty const&) { },
[&](Angle const& angle) {
ffi_context.basis_kind = 1;
ffi_context.basis_value = angle.raw_value();
diff --git a/Libraries/LibWeb/DOM/DocumentLoading.cpp b/Libraries/LibWeb/DOM/DocumentLoading.cpp
index ce6a7d9be23..69a8ef55cb9 100644
--- a/Libraries/LibWeb/DOM/DocumentLoading.cpp
+++ b/Libraries/LibWeb/DOM/DocumentLoading.cpp
@@ -419,7 +419,7 @@ static WebIDL::ExceptionOr<GC::Ref<DOM::Document>> load_media_document(HTML::Nav
navigation_params.response->body()->fully_read(
realm,
GC::create_function(GC::Heap::the(), [document](ByteBuffer) { HTML::HTMLParser::the_end(document, nullptr); }),
- GC::create_function(GC::Heap::the(), [](JS::Value) {}),
+ GC::create_function(GC::Heap::the(), [](JS::Value) { }),
GC::Ref { realm.global_object() });
// 9. Return document.
diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp
index 34cafd33b7c..5615d21653c 100644
--- a/Libraries/LibWeb/DOM/Element.cpp
+++ b/Libraries/LibWeb/DOM/Element.cpp
@@ -184,16 +184,16 @@ void Element::RareData::visit_edges(Cell::Visitor& visitor)
[&](CustomElementCallbackReaction const& callback_reaction) {
visitor.visit(callback_reaction.callback);
callback_reaction.arguments.visit(
- [](Empty) {},
+ [](Empty) { },
[&](CustomElementAdoptedCallbackReactionArguments const& adopted_arguments) {
visitor.visit(adopted_arguments.old_document);
visitor.visit(adopted_arguments.new_document);
},
- [&](CustomElementAttributeChangedCallbackReactionArguments const&) {},
+ [&](CustomElementAttributeChangedCallbackReactionArguments const&) { },
[&](CustomElementFormAssociatedCallbackReactionArguments const& form_associated_arguments) {
visitor.visit(form_associated_arguments.form);
},
- [&](CustomElementFormDisabledCallbackReactionArguments const&) {});
+ [&](CustomElementFormDisabledCallbackReactionArguments const&) { });
},
[&](CustomElementConnectedMoveCallbackReaction const& connected_move_reaction) {
visitor.visit(connected_move_reaction.disconnected_callback);
diff --git a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp
index dd6af464c3b..0fab37e5486 100644
--- a/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp
+++ b/Libraries/LibWeb/Fetch/Infrastructure/HTTP/Bodies.cpp
@@ -55,7 +55,7 @@ void Body::visit_edges(Cell::Visitor& visitor)
visitor.visit(m_sniff_bytes_callback);
m_source.visit(
[&](GC::Ref<FileAPI::Blob> const& blob) { visitor.visit(blob); },
- [](auto const&) {});
+ [](auto const&) { });
}
void Body::append_sniff_bytes(ReadonlyBytes bytes)
diff --git a/Libraries/LibWeb/HTML/CustomElements/CustomElementAlgorithms.cpp b/Libraries/LibWeb/HTML/CustomElements/CustomElementAlgorithms.cpp
index 39bf0fd2ac9..551c421e1a8 100644
--- a/Libraries/LibWeb/HTML/CustomElements/CustomElementAlgorithms.cpp
+++ b/Libraries/LibWeb/HTML/CustomElements/CustomElementAlgorithms.cpp
@@ -103,7 +103,7 @@ static GC::RootVector<JS::Value> custom_element_reaction_arguments_to_js(JS::Rea
GC::RootVector<JS::Value> js_arguments;
arguments.visit(
- [](Empty) {},
+ [](Empty) { },
[&](DOM::CustomElementAdoptedCallbackReactionArguments const& adopted_arguments) {
js_arguments.append(Bindings::document(realm, adopted_arguments.old_document));
js_arguments.append(Bindings::document(realm, adopted_arguments.new_document));
diff --git a/Libraries/LibWeb/HTML/CustomElements/CustomElementDefinition.cpp b/Libraries/LibWeb/HTML/CustomElements/CustomElementDefinition.cpp
index 91b56e2b055..ca09d3f458c 100644
--- a/Libraries/LibWeb/HTML/CustomElements/CustomElementDefinition.cpp
+++ b/Libraries/LibWeb/HTML/CustomElements/CustomElementDefinition.cpp
@@ -16,7 +16,7 @@ void CustomElementDefinition::visit_edges(Visitor& visitor)
for (auto& entry : m_construction_stack) {
entry.visit(
[&](GC::Ref<DOM::Element>& element) { visitor.visit(element); },
- [&](AlreadyConstructedCustomElementMarker&) {});
+ [&](AlreadyConstructedCustomElementMarker&) { });
}
}
diff --git a/Libraries/LibWeb/HTML/FormAssociatedElement.cpp b/Libraries/LibWeb/HTML/FormAssociatedElement.cpp
index 5a83aeb560d..621816079b6 100644
--- a/Libraries/LibWeb/HTML/FormAssociatedElement.cpp
+++ b/Libraries/LibWeb/HTML/FormAssociatedElement.cpp
@@ -814,13 +814,13 @@ void FormAssociatedElement::RareData::visit_edges(JS::Cell::Visitor& visitor)
[&visitor](GC::Ref<FileAPI::File> file) {
visitor.visit(file);
},
- [](auto&) {});
+ [](auto&) { });
face_rare_data->state.visit(
[&visitor](GC::Ref<FileAPI::File> file) {
visitor.visit(file);
},
- [](auto&) {});
+ [](auto&) { });
}
// A user-agent shadow tree's inner elements share their default declarations, parsed once, but each
diff --git a/Libraries/LibWeb/HTML/HTMLMediaElement.cpp b/Libraries/LibWeb/HTML/HTMLMediaElement.cpp
index bc49a5e0251..a7582d4ff75 100644
--- a/Libraries/LibWeb/HTML/HTMLMediaElement.cpp
+++ b/Libraries/LibWeb/HTML/HTMLMediaElement.cpp
@@ -1689,7 +1689,7 @@ void HTMLMediaElement::load_local_resource(MediaProvider const& media_provider,
// FIXME: Support File objects.
failure_callback("File objects are not supported"_utf16);
},
- [](Empty) {});
+ [](Empty) { });
// The resource described by the current media resource, if any, contains the media data. It is
// CORS-same-origin.
diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
index 027627df9bb..d086c069101 100644
--- a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
+++ b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
@@ -48,8 +48,8 @@ void HTMLScriptElement::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
m_result.visit(
- [](ResultState::Uninitialized) {},
- [](ResultState::Null) {},
+ [](ResultState::Uninitialized) { },
+ [](ResultState::Null) { },
[&]<typename T>(GC::Ref<T> result) { visitor.visit(result); });
visitor.visit(m_parser_document);
visitor.visit(m_preparation_time_document);
diff --git a/Libraries/LibWeb/HTML/LocalNavigable.cpp b/Libraries/LibWeb/HTML/LocalNavigable.cpp
index 87c8854038e..2f7a535f1ab 100644
--- a/Libraries/LibWeb/HTML/LocalNavigable.cpp
+++ b/Libraries/LibWeb/HTML/LocalNavigable.cpp
@@ -3109,7 +3109,7 @@ void LocalNavigable::queue_navigation_and_traversal_task_for_session_history_ent
it->response->resume_body_delivery();
it->reserved_environment->discard_environment();
},
- [](auto const&) {});
+ [](auto const&) { });
// FIXME: 2. Invoke WebDriver BiDi navigation failed with navigable and a new WebDriver BiDi navigation status whose id is navigationId, status is "canceled", and url is navigationParams's response's URL.
}
diff --git a/Libraries/LibWeb/HTML/NavigateParams.cpp b/Libraries/LibWeb/HTML/NavigateParams.cpp
index e1e224d6e37..0f9c095a943 100644
--- a/Libraries/LibWeb/HTML/NavigateParams.cpp
+++ b/Libraries/LibWeb/HTML/NavigateParams.cpp
@@ -22,7 +22,7 @@ void NavigateParams::visit_edges(GC::Cell::Visitor& visitor)
if (form_data_entry_list.has_value()) {
for (auto& entry : form_data_entry_list.value()) {
entry.value.visit([&](GC::Ref<FileAPI::File> const& file) { visitor.visit(file); },
- [&](auto const&) {});
+ [&](auto const&) { });
}
}
}
@@ -36,7 +36,7 @@ void PreparedNavigation::visit_edges(GC::Cell::Visitor& visitor)
if (form_data_entry_list.has_value()) {
for (auto& entry : form_data_entry_list.value()) {
entry.value.visit([&](GC::Ref<FileAPI::File> const& file) { visitor.visit(file); },
- [&](auto const&) {});
+ [&](auto const&) { });
}
}
}
diff --git a/Libraries/LibWeb/HTML/NavigationParamsDescriptor.cpp b/Libraries/LibWeb/HTML/NavigationParamsDescriptor.cpp
index 15ae9d8a77a..c605e26e1d8 100644
--- a/Libraries/LibWeb/HTML/NavigationParamsDescriptor.cpp
+++ b/Libraries/LibWeb/HTML/NavigationParamsDescriptor.cpp
@@ -280,7 +280,7 @@ static GC::Ptr<Fetch::Infrastructure::Body> adopt_navigation_response_body(JS::R
auto cross_origin_isolated_capability = Bindings::principal_host_defined_environment_settings_object(realm).cross_origin_isolated_capability();
request->set_unbuffered_request_callbacks(
- [](NonnullRefPtr<HTTP::HeaderList>, Optional<u32>, Optional<String> const&, Optional<Core::ImmutableBytes>, Optional<u64>, Requests::CacheState) {},
+ [](NonnullRefPtr<HTTP::HeaderList>, Optional<u32>, Optional<String> const&, Optional<Core::ImmutableBytes>, Optional<u64>, Requests::CacheState) { },
[receiver_root, &realm](Requests::ResponseData data) {
receiver_root->handle_network_data(realm, move(data), Fetch::Fetching::FetchedDataReceiver::NetworkState::Ongoing);
},
diff --git a/Libraries/LibWeb/HTML/Scripting/Fetching.cpp b/Libraries/LibWeb/HTML/Scripting/Fetching.cpp
index e7a25bddb5a..86a9bc4e9c4 100644
--- a/Libraries/LibWeb/HTML/Scripting/Fetching.cpp
+++ b/Libraries/LibWeb/HTML/Scripting/Fetching.cpp
@@ -262,9 +262,9 @@ static JS::OffThreadCompilationCallbacks thread_pool_compilation_callbacks()
static void compile_remaining_module_functions_off_thread(ModuleScript& module_script, NonnullRefPtr<JS::SourceCode const> source_code)
{
module_script.record().visit(
- [](Empty) {},
- [](GC::Ref<JS::SyntheticModule>) {},
- [](GC::Ref<JS::HostModule>) {},
+ [](Empty) { },
+ [](GC::Ref<JS::SyntheticModule>) { },
+ [](GC::Ref<JS::HostModule>) { },
[source_code = move(source_code)](GC::Ref<JS::SourceTextModule> module) mutable {
JS::compile_remaining_functions_off_thread(*module, move(source_code), thread_pool_compilation_callbacks());
});
@@ -1208,10 +1208,10 @@ void fetch_single_module_script(JS::Realm& realm,
BytecodeCacheInstallTarget install_target;
if (module_script) {
module_script->record().visit(
- [](Empty) {},
+ [](Empty) { },
[&](GC::Ref<JS::SourceTextModule> module) { install_target.module = module; },
- [](GC::Ref<JS::SyntheticModule>) {},
- [](GC::Ref<JS::HostModule>) {});
+ [](GC::Ref<JS::SyntheticModule>) { },
+ [](GC::Ref<JS::HostModule>) { });
if (!should_generate_bytecode_cache)
compile_remaining_module_functions_off_thread(*module_script, source_code_for_cache);
}
@@ -1247,10 +1247,10 @@ void fetch_single_module_script(JS::Realm& realm,
BytecodeCacheInstallTarget install_target;
if (module_script) {
module_script->record().visit(
- [](Empty) {},
+ [](Empty) { },
[&](GC::Ref<JS::SourceTextModule> module) { install_target.module = module; },
- [](GC::Ref<JS::SyntheticModule>) {},
- [](GC::Ref<JS::HostModule>) {});
+ [](GC::Ref<JS::SyntheticModule>) { },
+ [](GC::Ref<JS::HostModule>) { });
if (!should_generate_bytecode_cache)
compile_remaining_module_functions_off_thread(*module_script, source_code_for_cache);
}
diff --git a/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.cpp b/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.cpp
index ca07e5ee383..09efd342ff0 100644
--- a/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.cpp
+++ b/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.cpp
@@ -1640,7 +1640,7 @@ void WindowOrWorkerGlobalScopeMixin::report_an_exception(JS::Value exception, Om
error_info.colno = 0;
}
},
- [](auto const&) {});
+ [](auto const&) { });
// 5. If omitError is true, then set errorInfo[error] to null.
if (omit_error == OmitError::Yes)
diff --git a/Libraries/LibWeb/IndexedDB/Internal/Key.cpp b/Libraries/LibWeb/IndexedDB/Internal/Key.cpp
index f5768188b76..297608efa7f 100644
--- a/Libraries/LibWeb/IndexedDB/Internal/Key.cpp
+++ b/Libraries/LibWeb/IndexedDB/Internal/Key.cpp
@@ -223,7 +223,7 @@ void Key::visit_edges(Visitor& visitor)
[&](GC::Ref<GC::HeapVector<GC::Ref<Key>>> const& keys) {
visitor.visit(keys);
},
- [](auto const&) {});
+ [](auto const&) { });
}
}
diff --git a/Libraries/LibWeb/IndexedDB/Internal/MutationLog.cpp b/Libraries/LibWeb/IndexedDB/Internal/MutationLog.cpp
index 1eeeeb140a0..70e3bdd27ed 100644
--- a/Libraries/LibWeb/IndexedDB/Internal/MutationLog.cpp
+++ b/Libraries/LibWeb/IndexedDB/Internal/MutationLog.cpp
@@ -162,9 +162,9 @@ void MutationLog::append_changes(Utf16String const& database_name, Utf16String c
changes.deleted.append({ database_name, e.old_name });
changes.added.append({ database_name, object_store_name });
},
- [&](IndexCreated const&) {},
- [&](IndexDeleted const&) {},
- [&](IndexRenamed const&) {},
+ [&](IndexCreated const&) { },
+ [&](IndexDeleted const&) { },
+ [&](IndexRenamed const&) { },
[&](KeyGeneratorChanged const&) {
},
[&](RecordsDeleted const& e) {
@@ -174,8 +174,8 @@ void MutationLog::append_changes(Utf16String const& database_name, Utf16String c
[&](RecordStored const& e) {
append_stored_key(*e.key);
},
- [&](IndexRecordsDeleted const&) {},
- [&](IndexRecordStored const&) {});
+ [&](IndexRecordsDeleted const&) { },
+ [&](IndexRecordStored const&) { });
}
for (auto const& key : stored_keys)
diff --git a/Libraries/LibWeb/WebAudio/Rendering/MediaStreamSourceRenderNode.cpp b/Libraries/LibWeb/WebAudio/Rendering/MediaStreamSourceRenderNode.cpp
index 1494c259ed0..14ad193af31 100644
--- a/Libraries/LibWeb/WebAudio/Rendering/MediaStreamSourceRenderNode.cpp
+++ b/Libraries/LibWeb/WebAudio/Rendering/MediaStreamSourceRenderNode.cpp
@@ -30,7 +30,7 @@ void MediaStreamSourceRenderNode::handle_message(NodeMessage const& message)
// stride below can never disagree with the ring's layout.
m_channel_count = m_ring ? m_ring->channel_count() : max(set_ring.channel_count, 1u);
},
- [](auto const&) {});
+ [](auto const&) { });
}
void MediaStreamSourceRenderNode::process(RenderGraph&, RenderContext const& context)
diff --git a/Libraries/LibWeb/WebAudio/Rendering/RenderNodes.cpp b/Libraries/LibWeb/WebAudio/Rendering/RenderNodes.cpp
index 1c1ab4678c1..29784e6ebc0 100644
--- a/Libraries/LibWeb/WebAudio/Rendering/RenderNodes.cpp
+++ b/Libraries/LibWeb/WebAudio/Rendering/RenderNodes.cpp
@@ -98,7 +98,7 @@ void ScheduledSourceRenderNode::handle_message(NodeMessage const& message)
m_start_time_needs_clamping = true;
},
[&](StopSource const& stop_source) { m_stop_time = stop_source.when; },
- [](auto const&) {});
+ [](auto const&) { });
}
// Marks this node as ended once the quantum has advanced past the stop time or the content was exhausted.
@@ -541,7 +541,7 @@ void BiquadFilterRenderNode::handle_message(NodeMessage const& message)
{
message.visit(
[&](SetBiquadFilterType const& set_type) { m_type = set_type.type; },
- [](auto const&) {});
+ [](auto const&) { });
}
void BiquadFilterRenderNode::process(RenderGraph& graph, RenderContext const& context)
@@ -912,7 +912,7 @@ void PannerRenderNode::handle_message(NodeMessage const& message)
{
message.visit(
[&](SetPannerParameters const& parameters) { m_config = parameters; },
- [](auto const&) {});
+ [](auto const&) { });
}
void PannerRenderNode::for_each_param(Function<void(RenderAudioParam&)> const& callback)
diff --git a/Libraries/LibWeb/WebDriver/Actions.cpp b/Libraries/LibWeb/WebDriver/Actions.cpp
index 7c0c170fc88..2394f91ff7e 100644
--- a/Libraries/LibWeb/WebDriver/Actions.cpp
+++ b/Libraries/LibWeb/WebDriver/Actions.cpp
@@ -714,7 +714,7 @@ static AK::Duration compute_tick_duration(ReadonlySpan<ActionObject> tick_action
[&](OneOf<ActionObject::PauseFields, ActionObject::PointerMoveFields, ActionObject::ScrollFields> auto const& fields) {
duration = fields.duration;
},
- [](auto const&) {});
+ [](auto const&) { });
// 3. If duration is not undefined, and duration is greater than max duration, let max duration be equal to duration.
if (duration.has_value())
diff --git a/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
index 590c85efef1..4cf40732059 100644
--- a/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
+++ b/Libraries/LibWeb/XHR/XMLHttpRequest.cpp
@@ -159,7 +159,7 @@ void XMLHttpRequest::visit_edges(Cell::Visitor& visitor)
m_response_object.visit(
[&](GC::Ref<DOM::Document> document) { visitor.visit(document); },
[&](GC::Ref<FileAPI::Blob> blob) { visitor.visit(blob); },
- [](auto const&) {});
+ [](auto const&) { });
for (auto const& cached_response_object : m_cached_response_objects)
visitor.visit(cached_response_object.object);
}
diff --git a/Libraries/LibWebView/Menu.h b/Libraries/LibWebView/Menu.h
index 1928a1ca8c0..9134f387354 100644
--- a/Libraries/LibWebView/Menu.h
+++ b/Libraries/LibWebView/Menu.h
@@ -262,7 +262,7 @@ public:
item.visit(
[&](NonnullRefPtr<Action>& action) { callback(*action); },
[&](NonnullRefPtr<Menu>& submenu) { submenu->for_each_action(callback); },
- [&](Separator) {});
+ [&](Separator) { });
}
}
diff --git a/Libraries/LibWebView/NavigationLoader.cpp b/Libraries/LibWebView/NavigationLoader.cpp
index eb91aff6806..95a00558fc3 100644
--- a/Libraries/LibWebView/NavigationLoader.cpp
+++ b/Libraries/LibWebView/NavigationLoader.cpp
@@ -212,8 +212,8 @@ void NavigationLoader::set_response_body_callbacks(Requests::Request& request)
if (auto* loader = weak_this.ptr())
loader->did_acquire(true);
},
- [](Requests::ResponseData) {},
- [](Core::ImmutableBytes) {},
+ [](Requests::ResponseData) { },
+ [](Core::ImmutableBytes) { },
[weak_this](u64, Requests::RequestTimingInfo const&, Optional<Requests::NetworkError>) {
if (auto* loader = weak_this.ptr())
loader->did_acquire(false);
diff --git a/Libraries/LibWebView/ProcessManager.cpp b/Libraries/LibWebView/ProcessManager.cpp
index a64193edfb8..795e2518043 100644
--- a/Libraries/LibWebView/ProcessManager.cpp
+++ b/Libraries/LibWebView/ProcessManager.cpp
@@ -63,8 +63,8 @@ StringView process_name_from_type(ProcessType type)
}
ProcessManager::ProcessManager()
- : on_process_added([](Process&) {})
- , on_process_exited([](Process&&, Optional<int>) {})
+ : on_process_added([](Process&) { })
+ , on_process_exited([](Process&&, Optional<int>) { })
, m_process_monitor(ProcessMonitor([this](pid_t pid, Optional<int> exit_status) {
if (auto process = remove_process(pid); process.has_value()) {
process->save_crash_report(exit_status);
diff --git a/Libraries/LibWebView/ViewImplementation.cpp b/Libraries/LibWebView/ViewImplementation.cpp
index be60f04c16e..4e5b084b46e 100644
--- a/Libraries/LibWebView/ViewImplementation.cpp
+++ b/Libraries/LibWebView/ViewImplementation.cpp
@@ -990,7 +990,7 @@ void ViewImplementation::did_finish_handling_input_event(Badge<WebContentPage>,
if (on_finish_handling_drag_event)
on_finish_handling_drag_event(event);
},
- [](auto const&) {});
+ [](auto const&) { });
}
void ViewImplementation::did_forward_input_event(Badge<WebContentPage>, WebContentPage const& reporting_page, u64 event_id, WebContentPage& endpoint)
diff --git a/Tests/AK/TestVariant.cpp b/Tests/AK/TestVariant.cpp
index 9ed2631961c..ac6aa073177 100644
--- a/Tests/AK/TestVariant.cpp
+++ b/Tests/AK/TestVariant.cpp
@@ -44,8 +44,8 @@ TEST_CASE(visit_const)
the_value.visit(
[&](ByteString const&) { correct = true; },
- [&](auto&) {},
- [&](auto const&) {});
+ [&](auto&) { },
+ [&](auto const&) { });
EXPECT(correct);
@@ -53,7 +53,7 @@ TEST_CASE(visit_const)
auto the_value_but_not_const = the_value;
the_value_but_not_const.visit(
[&](ByteString const&) { correct = true; },
- [&](auto&) {});
+ [&](auto&) { });
EXPECT(correct);
diff --git a/Tests/AudioServer/TestRemotePlaybackStream.cpp b/Tests/AudioServer/TestRemotePlaybackStream.cpp
index e866d68fade..38c53280cd6 100644
--- a/Tests/AudioServer/TestRemotePlaybackStream.cpp
+++ b/Tests/AudioServer/TestRemotePlaybackStream.cpp
@@ -180,7 +180,7 @@ TEST_CASE(resume_attaches_a_ring_that_the_pump_fills)
auto stream = fixture.create_stream(Audio::OutputState::Suspended, source);
bool resumed = false;
- stream->resume()->when_resolved([&] { resumed = true; }).when_rejected([](Error&&) {});
+ stream->resume()->when_resolved([&] { resumed = true; }).when_rejected([](Error&&) { });
EXPECT(fixture.pump_until([&] { return resumed && fixture.mixer->has_clients() && fixture.device->is_playing(); }));
EXPECT(fixture.render_until_full_buffer_of(1.0f));
}
@@ -236,11 +236,11 @@ TEST_CASE(resume_after_a_drain_plays_again)
(void)stream->resume();
EXPECT(fixture.render_until_full_buffer_of(1.0f));
bool drained = false;
- stream->drain_buffer_and_suspend()->when_resolved([&] { drained = true; }).when_rejected([](Error&&) {});
+ stream->drain_buffer_and_suspend()->when_resolved([&] { drained = true; }).when_rejected([](Error&&) { });
EXPECT(fixture.render_until([&] { return drained; }));
bool resumed = false;
- stream->resume()->when_resolved([&] { resumed = true; }).when_rejected([](Error&&) {});
+ stream->resume()->when_resolved([&] { resumed = true; }).when_rejected([](Error&&) { });
EXPECT(fixture.render_until_full_buffer_of(1.0f));
EXPECT(fixture.pump_until([&] { return resumed; }));
}
@@ -264,7 +264,7 @@ TEST_CASE(drain_completes_once_the_device_has_played_the_ring_out)
// Stop supplying, then drain: the request completes only after the fake has rendered everything.
source.starved = true;
bool drained = false;
- stream->drain_buffer_and_suspend()->when_resolved([&] { drained = true; }).when_rejected([](Error&&) {});
+ stream->drain_buffer_and_suspend()->when_resolved([&] { drained = true; }).when_rejected([](Error&&) { });
fixture.loop.pump(Core::EventLoop::WaitMode::PollForEvents);
EXPECT(!drained);
EXPECT(fixture.render_until([&] { return drained; }));
@@ -280,7 +280,7 @@ TEST_CASE(discard_drops_the_ring_and_suspends)
EXPECT(fixture.pump_until([&] { return source.frames_supplied.load() >= 480; }));
bool discarded = false;
- stream->discard_buffer_and_suspend()->when_resolved([&] { discarded = true; }).when_rejected([](Error&&) {});
+ stream->discard_buffer_and_suspend()->when_resolved([&] { discarded = true; }).when_rejected([](Error&&) { });
EXPECT(fixture.pump_until([&] { return discarded && !fixture.device->is_playing(); }));
auto requests_after_discard = source.requests.load();
@@ -352,7 +352,7 @@ TEST_CASE(losing_the_connection_reports_output_lost_and_settles_requests)
EXPECT(fixture.pump_until([&] { return output_lost; }));
bool drained = false;
- stream->drain_buffer_and_suspend()->when_resolved([&] { drained = true; }).when_rejected([](Error&&) {});
+ stream->drain_buffer_and_suspend()->when_resolved([&] { drained = true; }).when_rejected([](Error&&) { });
EXPECT(fixture.pump_until([&] { return drained; }));
auto requests_at_loss = source.requests.load();
fixture.pump_until([&] { return false; }, AK::Duration::from_milliseconds(50));
diff --git a/Tests/LibHTTP/TestDiskCache.cpp b/Tests/LibHTTP/TestDiskCache.cpp
index 85191a831f1..4936df6e9aa 100644
--- a/Tests/LibHTTP/TestDiskCache.cpp
+++ b/Tests/LibHTTP/TestDiskCache.cpp
@@ -518,7 +518,7 @@ TEST_CASE(cache_partitions_do_not_share_entries)
[&](Optional<HTTP::CacheEntryReader&> reader) {
EXPECT(!reader.has_value());
},
- [](HTTP::DiskCache::CacheHasOpenEntry) {});
+ [](HTTP::DiskCache::CacheHasOpenEntry) { });
}
auto stored = TRY_OR_FAIL(disk_cache.store_associated_data(partition, url, "GET"sv, *request_headers, {}, HTTP::CacheEntryAssociatedData::JavaScriptBytecode, bytecode.bytes()));
diff --git a/Tests/LibSandbox/TestSeccomp.cpp b/Tests/LibSandbox/TestSeccomp.cpp
index b24f5538919..f9b6454087b 100644
--- a/Tests/LibSandbox/TestSeccomp.cpp
+++ b/Tests/LibSandbox/TestSeccomp.cpp
@@ -392,7 +392,7 @@ TEST_CASE(pulseaudio_client_policy_allows_directory_creation_and_record_locks)
EXPECT_EQ(WEXITSTATUS(status), 0);
status = run_with_policy(
- [](auto&) {},
+ [](auto&) { },
[&] {
(void)mkdir(existing_directory, 0700);
});
diff --git a/Tests/LibWeb/test-web/Display.cpp b/Tests/LibWeb/test-web/Display.cpp
index 5759261af11..e50c6d01a68 100644
--- a/Tests/LibWeb/test-web/Display.cpp
+++ b/Tests/LibWeb/test-web/Display.cpp
@@ -251,7 +251,7 @@ void Display::render_live_display() const
}
t.lines(
- [] {},
+ [] { },
[&] {
t.counter({
{ .label = "Pass"sv, .color = ::Test::LiveDisplay::Green, .value = pass_count },
@@ -261,7 +261,7 @@ void Display::render_live_display() const
{ .label = "Crashed"sv, .color = ::Test::LiveDisplay::Magenta, .value = crashed_count },
});
},
- [] {},
+ [] { },
[&] {
if (total_tests() == 0)
return;
diff --git a/Tests/LibWeb/test-web/main.cpp b/Tests/LibWeb/test-web/main.cpp
index 09cb61093be..6e792fc90b5 100644
--- a/Tests/LibWeb/test-web/main.cpp
+++ b/Tests/LibWeb/test-web/main.cpp
@@ -1006,7 +1006,7 @@ static void set_ui_callbacks_for_tests(TestWebView& view, TestRunContext& contex
for (auto const& filter : accepted_file_types.filters) {
filter.visit(
- [](Web::HTML::FileFilter::FileType) {},
+ [](Web::HTML::FileFilter::FileType) { },
[&](Web::HTML::FileFilter::MimeType const& mime_type) {
if (mime_type.value == "text/plain"sv)
add_txt_files = true;
diff --git a/Tests/UI/Qt/TestWindowCloseCoordinator.cpp b/Tests/UI/Qt/TestWindowCloseCoordinator.cpp
index 23a220d87b3..f11ca5c9724 100644
--- a/Tests/UI/Qt/TestWindowCloseCoordinator.cpp
+++ b/Tests/UI/Qt/TestWindowCloseCoordinator.cpp
@@ -67,7 +67,7 @@ TEST_CASE(repeated_start_and_late_completions_are_ignored)
preflights.append([&](auto on_complete) { completion = move(on_complete); });
size_t canceled_count = 0;
- EXPECT(coordinator.start(move(preflights), [] {}, [&] { ++canceled_count; }));
+ EXPECT(coordinator.start(move(preflights), [] { }, [&] { ++canceled_count; }));
EXPECT(!coordinator.start({}, [] { }, [] { }));
coordinator.cancel();
EXPECT_EQ(canceled_count, 1u);
@@ -81,7 +81,7 @@ TEST_CASE(an_empty_preflight_is_immediately_approved)
{
Ladybird::WindowCloseCoordinator coordinator;
bool approved = false;
- EXPECT(coordinator.start({}, [&] { approved = true; }, [] {}));
+ EXPECT(coordinator.start({}, [&] { approved = true; }, [] { }));
EXPECT(approved);
EXPECT(!coordinator.is_running());
}
diff --git a/Utilities/wasm.cpp b/Utilities/wasm.cpp
index fcbd107fb7e..25cdd948940 100644
--- a/Utilities/wasm.cpp
+++ b/Utilities/wasm.cpp
@@ -1182,7 +1182,7 @@ ErrorOr<int> ladybird_main(Main::Arguments arguments)
g_stdout->write_until_depleted(" code:\n"sv).release_value_but_fixme_should_propagate_errors();
printer.print(func.code());
},
- [](Wasm::HostFunction const&) {});
+ [](Wasm::HostFunction const&) { });
}
};
if (print) {