mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -19,13 +19,13 @@
|
|||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static Optional<String> description_only(String description, [[maybe_unused]] const String& path)
|
||||
static Optional<String> description_only(String description, [[maybe_unused]] String const& path)
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
// FIXME: Ideally Gfx::ImageDecoder could tell us the image type directly.
|
||||
static Optional<String> image_details(const String& description, const String& path)
|
||||
static Optional<String> image_details(String const& description, String const& path)
|
||||
{
|
||||
auto file_or_error = Core::MappedFile::map(path);
|
||||
if (file_or_error.is_error())
|
||||
|
@ -39,7 +39,7 @@ static Optional<String> image_details(const String& description, const String& p
|
|||
return String::formatted("{}, {} x {}", description, image_decoder->width(), image_decoder->height());
|
||||
}
|
||||
|
||||
static Optional<String> gzip_details(String description, const String& path)
|
||||
static Optional<String> gzip_details(String description, String const& path)
|
||||
{
|
||||
auto file_or_error = Core::MappedFile::map(path);
|
||||
if (file_or_error.is_error())
|
||||
|
@ -56,7 +56,7 @@ static Optional<String> gzip_details(String description, const String& path)
|
|||
return String::formatted("{}, {}", description, gzip_details.value());
|
||||
}
|
||||
|
||||
static Optional<String> elf_details(String description, const String& path)
|
||||
static Optional<String> elf_details(String description, String const& path)
|
||||
{
|
||||
auto file_or_error = Core::MappedFile::map(path);
|
||||
if (file_or_error.is_error())
|
||||
|
@ -127,7 +127,7 @@ static Optional<String> elf_details(String description, const String& path)
|
|||
__ENUMERATE_MIME_TYPE_DESCRIPTION("text/markdown", "Markdown document", description_only) \
|
||||
__ENUMERATE_MIME_TYPE_DESCRIPTION("text/x-shellscript", "POSIX shell script text executable", description_only)
|
||||
|
||||
static Optional<String> get_description_from_mime_type(const String& mime, const String& path)
|
||||
static Optional<String> get_description_from_mime_type(String const& mime, String const& path)
|
||||
{
|
||||
#define __ENUMERATE_MIME_TYPE_DESCRIPTION(mime_type, description, details) \
|
||||
if (String(mime_type) == mime) \
|
||||
|
@ -141,7 +141,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(Core::System::pledge("stdio rpath"));
|
||||
|
||||
Vector<const char*> paths;
|
||||
Vector<char const*> paths;
|
||||
bool flag_mime_only = false;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue