1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

LibWeb: Mark compilation-unit-only functions as static

This enables a nice warning in case a function becomes dead code. Also, in the
case of {Event,Node}WrapperFactory.cpp, the corresponding header was forgotten.
This would cause an issue later when we enable -Wmissing-declarations.

Is my clang-format misconfigured? Why is the diff for NodeWrapperFactory.cpp
so large?
This commit is contained in:
Ben Wiederhake 2020-08-11 00:07:16 +02:00 committed by Andreas Kling
parent 3ec7b8b33c
commit e050f21f36
5 changed files with 21 additions and 21 deletions

View file

@ -60,7 +60,7 @@ void Resource::for_each_client(Function<void(ResourceClient&)> callback)
}
}
String encoding_from_content_type(const String& content_type)
static String encoding_from_content_type(const String& content_type)
{
auto offset = content_type.index_of("charset=");
if (offset.has_value()) {
@ -75,7 +75,7 @@ String encoding_from_content_type(const String& content_type)
return "utf-8";
}
String mime_type_from_content_type(const String& content_type)
static String mime_type_from_content_type(const String& content_type)
{
auto offset = content_type.index_of(";");
if (offset.has_value())