1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 14:55:07 +00:00

Meta+LibC through LibHTTP: Make clang-format-10 clean

Why break at LibHTTP? Because "Meta+Libraries" would be insanely large,
and breaking between LibHTTP and LibJS makes the commits roughly evenly large.
This commit is contained in:
Ben Wiederhake 2020-09-18 09:49:51 +02:00 committed by Andreas Kling
parent 64cc3f51d0
commit ede5dbd7b3
58 changed files with 87 additions and 89 deletions

View file

@ -37,7 +37,7 @@ __BEGIN_DECLS
const char* inet_ntop(int af, const void* src, char* dst, socklen_t); const char* inet_ntop(int af, const void* src, char* dst, socklen_t);
int inet_pton(int af, const char* src, void* dst); int inet_pton(int af, const char* src, void* dst);
static inline int inet_aton(const char *cp, struct in_addr *inp) static inline int inet_aton(const char* cp, struct in_addr* inp)
{ {
return inet_pton(AF_INET, cp, inp); return inet_pton(AF_INET, cp, inp);
} }

View file

@ -32,8 +32,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <AK/LexicalPath.h>
#include <AK/HashMap.h> #include <AK/HashMap.h>
#include <AK/LexicalPath.h>
#include <AK/RefPtr.h> #include <AK/RefPtr.h>
#include <AK/ScopeGuard.h> #include <AK/ScopeGuard.h>
#include <AK/String.h> #include <AK/String.h>
@ -85,7 +85,8 @@ void* dlopen(const char* filename, int flags)
ScopeGuard close_fd_guard([fd]() { close(fd); }); ScopeGuard close_fd_guard([fd]() { close(fd); });
struct stat file_stats{}; struct stat file_stats {
};
int ret = fstat(fd, &file_stats); int ret = fstat(fd, &file_stats);
if (ret < 0) { if (ret < 0) {

View file

@ -26,8 +26,8 @@
#pragma once #pragma once
#include <sys/cdefs.h>
#include <stddef.h> #include <stddef.h>
#include <sys/cdefs.h>
__BEGIN_DECLS __BEGIN_DECLS

View file

@ -29,7 +29,7 @@
#include <bits/stdint.h> #include <bits/stdint.h>
#ifndef PAGE_SIZE #ifndef PAGE_SIZE
#define PAGE_SIZE 4096 # define PAGE_SIZE 4096
#endif #endif
#define PATH_MAX 4096 #define PATH_MAX 4096

View file

@ -28,4 +28,3 @@
#define MALLOC_SCRUB_BYTE 0xdc #define MALLOC_SCRUB_BYTE 0xdc
#define FREE_SCRUB_BYTE 0xed #define FREE_SCRUB_BYTE 0xed

View file

@ -26,9 +26,9 @@
#pragma once #pragma once
#include <bits/stdint.h>
#include <signal.h> #include <signal.h>
#include <stdbool.h> #include <stdbool.h>
#include <bits/stdint.h>
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>

View file

@ -64,7 +64,7 @@ struct sigaction {
int kill(pid_t, int sig); int kill(pid_t, int sig);
int killpg(int pgrp, int sig); int killpg(int pgrp, int sig);
sighandler_t signal(int sig, sighandler_t); sighandler_t signal(int sig, sighandler_t);
int pthread_sigmask(int how, const sigset_t *set, sigset_t *ol_dset); int pthread_sigmask(int how, const sigset_t* set, sigset_t* ol_dset);
int sigaction(int sig, const struct sigaction* act, struct sigaction* old_act); int sigaction(int sig, const struct sigaction* act, struct sigaction* old_act);
int sigemptyset(sigset_t*); int sigemptyset(sigset_t*);
int sigfillset(sigset_t*); int sigfillset(sigset_t*);

View file

@ -34,14 +34,14 @@
#include <spawn.h> #include <spawn.h>
#include <AK/Function.h>
#include <AK/Vector.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <AK/Function.h> #include <unistd.h>
#include <AK/Vector.h>
struct posix_spawn_file_actions_state { struct posix_spawn_file_actions_state {
Vector<Function<int()>, 4> actions; Vector<Function<int()>, 4> actions;
@ -286,5 +286,4 @@ int posix_spawnattr_setsigmask(posix_spawnattr_t* attr, const sigset_t* sigmask)
attr->sigmask = *sigmask; attr->sigmask = *sigmask;
return 0; return 0;
} }
} }

View file

@ -28,13 +28,13 @@
#ifndef KERNEL #ifndef KERNEL
#include <sys/cdefs.h> # include <sys/cdefs.h>
#ifdef __cplusplus # ifdef __cplusplus
# define NULL nullptr # define NULL nullptr
#else # else
# define NULL ((void*)0) # define NULL ((void*)0)
#endif # endif
typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef __PTRDIFF_TYPE__ ptrdiff_t;
typedef __SIZE_TYPE__ size_t; typedef __SIZE_TYPE__ size_t;

View file

@ -28,9 +28,9 @@
#define _STDIO_H // Make GMP believe we exist. #define _STDIO_H // Make GMP believe we exist.
#include <bits/FILE.h>
#include <limits.h> #include <limits.h>
#include <stdarg.h> #include <stdarg.h>
#include <bits/FILE.h>
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>

View file

@ -334,7 +334,7 @@ void ArgsParser::add_positional_argument(double& value, const char* help_string,
required == Required::Yes ? 1 : 0, required == Required::Yes ? 1 : 0,
1, 1,
[&value](const char* s) { [&value](const char* s) {
char *p; char* p;
double v = strtod(s, &p); double v = strtod(s, &p);
bool valid_value = !isnan(v) && p != s; bool valid_value = !isnan(v) && p != s;
if (valid_value) { if (valid_value) {

View file

@ -32,7 +32,7 @@ namespace Core {
class ElapsedTimer { class ElapsedTimer {
public: public:
ElapsedTimer() {} ElapsedTimer() { }
bool is_valid() const { return m_valid; } bool is_valid() const { return m_valid; }
void start(); void start();

View file

@ -37,7 +37,7 @@ class MimeData : public Object {
C_OBJECT(MimeData); C_OBJECT(MimeData);
public: public:
virtual ~MimeData() {} virtual ~MimeData() { }
ByteBuffer data(const String& mime_type) const { return m_data.get(mime_type).value_or({}); } ByteBuffer data(const String& mime_type) const { return m_data.get(mime_type).value_or({}); }
void set_data(const String& mime_type, const ByteBuffer& data) { m_data.set(mime_type, data); } void set_data(const String& mime_type, const ByteBuffer& data) { m_data.set(mime_type, data); }
@ -56,7 +56,7 @@ public:
void set_urls(const Vector<URL>&); void set_urls(const Vector<URL>&);
private: private:
MimeData() {} MimeData() { }
HashMap<String, ByteBuffer> m_data; HashMap<String, ByteBuffer> m_data;
}; };

View file

@ -34,7 +34,7 @@ namespace Crypto::Checksum {
class Adler32 : public ChecksumFunction<u32> { class Adler32 : public ChecksumFunction<u32> {
public: public:
Adler32() {} Adler32() { }
Adler32(ReadonlyBytes data) Adler32(ReadonlyBytes data)
{ {
update(data); update(data);

View file

@ -54,7 +54,8 @@ struct Table {
} }
} }
constexpr u32 operator[](int index) const { constexpr u32 operator[](int index) const
{
return data[index]; return data[index];
} }
}; };
@ -63,7 +64,7 @@ constexpr static auto table = Table();
class CRC32 : public ChecksumFunction<u32> { class CRC32 : public ChecksumFunction<u32> {
public: public:
CRC32() {} CRC32() { }
CRC32(ReadonlyBytes data) CRC32(ReadonlyBytes data)
{ {
update(data); update(data);

View file

@ -74,7 +74,7 @@ private:
: IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch") : IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch")
{ {
} }
virtual void handle(const Messages::LaunchClient::Dummy&) override {} virtual void handle(const Messages::LaunchClient::Dummy&) override { }
}; };
bool Launcher::open(const URL& url, const String& handler_name) bool Launcher::open(const URL& url, const String& handler_name)

View file

@ -43,7 +43,7 @@ public:
UserDefault UserDefault
}; };
struct Details: public RefCounted<Details> { struct Details : public RefCounted<Details> {
String name; String name;
String executable; String executable;

View file

@ -52,7 +52,7 @@ public:
{ {
} }
~DynamicEntry() {} ~DynamicEntry() { }
Elf32_Sword tag() const { return m_dyn.d_tag; } Elf32_Sword tag() const { return m_dyn.d_tag; }
Elf32_Addr ptr() const { return m_dyn.d_un.d_ptr; } Elf32_Addr ptr() const { return m_dyn.d_un.d_ptr; }
@ -71,7 +71,7 @@ public:
{ {
} }
~Symbol() {} ~Symbol() { }
const char* name() const { return m_dynamic.symbol_string_table_string(m_sym.st_name); } const char* name() const { return m_dynamic.symbol_string_table_string(m_sym.st_name); }
unsigned section_index() const { return m_sym.st_shndx; } unsigned section_index() const { return m_sym.st_shndx; }
@ -99,7 +99,7 @@ public:
, m_name(name) , m_name(name)
{ {
} }
~Section() {} ~Section() { }
const char* name() const { return m_name; } const char* name() const { return m_name; }
unsigned offset() const { return m_section_offset; } unsigned offset() const { return m_section_offset; }
@ -140,7 +140,7 @@ public:
{ {
} }
~Relocation() {} ~Relocation() { }
unsigned offset_in_section() const { return m_offset_in_section; } unsigned offset_in_section() const { return m_offset_in_section; }
unsigned offset() const { return m_rel.r_offset; } unsigned offset() const { return m_rel.r_offset; }

View file

@ -45,7 +45,7 @@ namespace ELF {
class Loader : public RefCounted<Loader> { class Loader : public RefCounted<Loader> {
public: public:
static NonnullRefPtr<Loader> create(const u8* data, size_t size, bool verbose_logging=true) { return adopt(*new Loader(data, size, verbose_logging)); } static NonnullRefPtr<Loader> create(const u8* data, size_t size, bool verbose_logging = true) { return adopt(*new Loader(data, size, verbose_logging)); }
~Loader(); ~Loader();
bool load(); bool load();

View file

@ -26,8 +26,8 @@
#include <AK/Assertions.h> #include <AK/Assertions.h>
#include <AK/String.h> #include <AK/String.h>
#include <LibELF/exec_elf.h>
#include <LibELF/Validation.h> #include <LibELF/Validation.h>
#include <LibELF/exec_elf.h>
namespace ELF { namespace ELF {

View file

@ -30,7 +30,7 @@
namespace ELF { namespace ELF {
bool validate_elf_header(const Elf32_Ehdr& elf_header, size_t file_size, bool verbose=true); bool validate_elf_header(const Elf32_Ehdr& elf_header, size_t file_size, bool verbose = true);
bool validate_program_headers(const Elf32_Ehdr& elf_header, size_t file_size, u8* buffer, size_t buffer_size, String& interpreter_path); bool validate_program_headers(const Elf32_Ehdr& elf_header, size_t file_size, u8* buffer, size_t buffer_size, String& interpreter_path);
} // end namespace ELF } // end namespace ELF

View file

@ -29,8 +29,8 @@
#include <LibGUI/AboutDialog.h> #include <LibGUI/AboutDialog.h>
#include <LibGUI/BoxLayout.h> #include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h> #include <LibGUI/Button.h>
#include <LibGUI/Label.h>
#include <LibGUI/ImageWidget.h> #include <LibGUI/ImageWidget.h>
#include <LibGUI/Label.h>
#include <LibGUI/Widget.h> #include <LibGUI/Widget.h>
#include <LibGfx/Font.h> #include <LibGfx/Font.h>

View file

@ -34,8 +34,8 @@ namespace GUI {
class ActionGroup : public Weakable<ActionGroup> { class ActionGroup : public Weakable<ActionGroup> {
public: public:
ActionGroup() {} ActionGroup() { }
~ActionGroup() {} ~ActionGroup() { }
void add_action(Action&); void add_action(Action&);
void remove_action(Action&); void remove_action(Action&);

View file

@ -34,8 +34,9 @@ namespace GUI {
class BoxLayout : public Layout { class BoxLayout : public Layout {
C_OBJECT(BoxLayout); C_OBJECT(BoxLayout);
public: public:
virtual ~BoxLayout() override {} virtual ~BoxLayout() override { }
Gfx::Orientation orientation() const { return m_orientation; } Gfx::Orientation orientation() const { return m_orientation; }
@ -50,22 +51,24 @@ private:
class VerticalBoxLayout final : public BoxLayout { class VerticalBoxLayout final : public BoxLayout {
C_OBJECT(VerticalBoxLayout); C_OBJECT(VerticalBoxLayout);
public: public:
explicit VerticalBoxLayout() explicit VerticalBoxLayout()
: BoxLayout(Gfx::Orientation::Vertical) : BoxLayout(Gfx::Orientation::Vertical)
{ {
} }
virtual ~VerticalBoxLayout() override {} virtual ~VerticalBoxLayout() override { }
}; };
class HorizontalBoxLayout final : public BoxLayout { class HorizontalBoxLayout final : public BoxLayout {
C_OBJECT(HorizontalBoxLayout); C_OBJECT(HorizontalBoxLayout);
public: public:
explicit HorizontalBoxLayout() explicit HorizontalBoxLayout()
: BoxLayout(Gfx::Orientation::Horizontal) : BoxLayout(Gfx::Orientation::Horizontal)
{ {
} }
virtual ~HorizontalBoxLayout() override {} virtual ~HorizontalBoxLayout() override { }
}; };
} }

View file

@ -28,10 +28,10 @@
#include <AK/Function.h> #include <AK/Function.h>
#include <AK/String.h> #include <AK/String.h>
#include <LibGUI/AbstractButton.h>
#include <LibGfx/Bitmap.h> #include <LibGfx/Bitmap.h>
#include <LibGfx/StylePainter.h> #include <LibGfx/StylePainter.h>
#include <LibGfx/TextAlignment.h> #include <LibGfx/TextAlignment.h>
#include <LibGUI/AbstractButton.h>
namespace GUI { namespace GUI {

View file

@ -128,7 +128,6 @@ public:
private: private:
CustomColorWidget(Color); CustomColorWidget(Color);
RefPtr<ColorField> m_color_field; RefPtr<ColorField> m_color_field;
RefPtr<ColorSlider> m_color_slider; RefPtr<ColorSlider> m_color_slider;
}; };

View file

@ -34,13 +34,13 @@ class Command {
public: public:
virtual ~Command(); virtual ~Command();
virtual void undo() {} virtual void undo() { }
virtual void redo() {} virtual void redo() { }
String action_text() const { return m_action_text; } String action_text() const { return m_action_text; }
protected: protected:
Command() {} Command() { }
void set_action_text(const String& text) { m_action_text = text; } void set_action_text(const String& text) { m_action_text = text; }
private: private:

View file

@ -32,7 +32,7 @@ namespace GUI {
class CppSyntaxHighlighter final : public SyntaxHighlighter { class CppSyntaxHighlighter final : public SyntaxHighlighter {
public: public:
CppSyntaxHighlighter() {} CppSyntaxHighlighter() { }
virtual ~CppSyntaxHighlighter() override; virtual ~CppSyntaxHighlighter() override;
virtual bool is_identifier(void*) const override; virtual bool is_identifier(void*) const override;

View file

@ -26,8 +26,8 @@
#include <AK/QuickSort.h> #include <AK/QuickSort.h>
#include <LibCore/DirIterator.h> #include <LibCore/DirIterator.h>
#include <LibGfx/Font.h>
#include <LibGUI/FontDatabase.h> #include <LibGUI/FontDatabase.h>
#include <LibGfx/Font.h>
#include <dirent.h> #include <dirent.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -26,8 +26,8 @@
#pragma once #pragma once
#include <LibGfx/StylePainter.h>
#include <LibGUI/Widget.h> #include <LibGUI/Widget.h>
#include <LibGfx/StylePainter.h>
namespace GUI { namespace GUI {

View file

@ -32,7 +32,7 @@ namespace GUI {
class IniSyntaxHighlighter final : public SyntaxHighlighter { class IniSyntaxHighlighter final : public SyntaxHighlighter {
public: public:
IniSyntaxHighlighter() {} IniSyntaxHighlighter() { }
virtual ~IniSyntaxHighlighter() override; virtual ~IniSyntaxHighlighter() override;
virtual bool is_identifier(void*) const override; virtual bool is_identifier(void*) const override;

View file

@ -36,13 +36,13 @@ namespace GUI {
class IconImpl : public RefCounted<IconImpl> { class IconImpl : public RefCounted<IconImpl> {
public: public:
static NonnullRefPtr<IconImpl> create() { return adopt(*new IconImpl); } static NonnullRefPtr<IconImpl> create() { return adopt(*new IconImpl); }
~IconImpl() {} ~IconImpl() { }
const Gfx::Bitmap* bitmap_for_size(int) const; const Gfx::Bitmap* bitmap_for_size(int) const;
void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap>&&); void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap>&&);
private: private:
IconImpl() {} IconImpl() { }
HashMap<int, RefPtr<Gfx::Bitmap>> m_bitmaps; HashMap<int, RefPtr<Gfx::Bitmap>> m_bitmaps;
}; };
@ -53,7 +53,7 @@ public:
explicit Icon(RefPtr<Gfx::Bitmap>&&, RefPtr<Gfx::Bitmap>&&); explicit Icon(RefPtr<Gfx::Bitmap>&&, RefPtr<Gfx::Bitmap>&&);
explicit Icon(const IconImpl&); explicit Icon(const IconImpl&);
Icon(const Icon&); Icon(const Icon&);
~Icon() {} ~Icon() { }
static Icon default_icon(const StringView&); static Icon default_icon(const StringView&);

View file

@ -26,8 +26,8 @@
#pragma once #pragma once
#include <LibGfx/TextAlignment.h>
#include <LibGUI/Frame.h> #include <LibGUI/Frame.h>
#include <LibGfx/TextAlignment.h>
namespace GUI { namespace GUI {

View file

@ -30,7 +30,7 @@ namespace GUI {
class Margins { class Margins {
public: public:
Margins() {} Margins() { }
Margins(int left, int top, int right, int bottom) Margins(int left, int top, int right, int bottom)
: m_left(left) : m_left(left)
, m_top(top) , m_top(top)
@ -38,7 +38,7 @@ public:
, m_bottom(bottom) , m_bottom(bottom)
{ {
} }
~Margins() {} ~Margins() { }
bool is_null() const { return !m_left && !m_top && !m_right && !m_bottom; } bool is_null() const { return !m_left && !m_top && !m_right && !m_bottom; }

View file

@ -26,8 +26,8 @@
#include <LibGUI/BoxLayout.h> #include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h> #include <LibGUI/Button.h>
#include <LibGUI/Label.h>
#include <LibGUI/ImageWidget.h> #include <LibGUI/ImageWidget.h>
#include <LibGUI/Label.h>
#include <LibGUI/MessageBox.h> #include <LibGUI/MessageBox.h>
#include <LibGfx/Font.h> #include <LibGfx/Font.h>
#include <stdio.h> #include <stdio.h>

View file

@ -28,10 +28,10 @@
#include <AK/Badge.h> #include <AK/Badge.h>
#include <AK/HashTable.h> #include <AK/HashTable.h>
#include <AK/Noncopyable.h>
#include <AK/TemporaryChange.h> #include <AK/TemporaryChange.h>
#include <AK/Vector.h> #include <AK/Vector.h>
#include <LibGUI/ModelIndex.h> #include <LibGUI/ModelIndex.h>
#include <AK/Noncopyable.h>
namespace GUI { namespace GUI {

View file

@ -45,9 +45,8 @@ private:
NotificationServerConnection() NotificationServerConnection()
: IPC::ServerConnection<NotificationClientEndpoint, NotificationServerEndpoint>(*this, "/tmp/portal/notify") : IPC::ServerConnection<NotificationClientEndpoint, NotificationServerEndpoint>(*this, "/tmp/portal/notify")
{ {
} }
virtual void handle(const Messages::NotificationClient::Dummy&) override {} virtual void handle(const Messages::NotificationClient::Dummy&) override { }
}; };
Notification::Notification() Notification::Notification()

View file

@ -26,8 +26,8 @@
#pragma once #pragma once
#include <LibGUI/Dialog.h>
#include <LibCore/Timer.h> #include <LibCore/Timer.h>
#include <LibGUI/Dialog.h>
namespace GUI { namespace GUI {

View file

@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <LibGfx/CharacterBitmap.h>
#include <LibGfx/Palette.h>
#include <LibGUI/Painter.h> #include <LibGUI/Painter.h>
#include <LibGUI/ResizeCorner.h> #include <LibGUI/ResizeCorner.h>
#include <LibGUI/Window.h> #include <LibGUI/Window.h>
#include <LibGfx/CharacterBitmap.h>
#include <LibGfx/Palette.h>
namespace GUI { namespace GUI {

View file

@ -82,7 +82,7 @@ protected:
virtual void custom_layout() override; virtual void custom_layout() override;
virtual void resize_event(ResizeEvent&) override; virtual void resize_event(ResizeEvent&) override;
virtual void mousewheel_event(MouseEvent&) override; virtual void mousewheel_event(MouseEvent&) override;
virtual void did_scroll() {} virtual void did_scroll() { }
void set_content_size(const Gfx::IntSize&); void set_content_size(const Gfx::IntSize&);
void set_size_occupied_by_fixed_elements(const Gfx::IntSize&); void set_size_occupied_by_fixed_elements(const Gfx::IntSize&);

View file

@ -33,7 +33,7 @@ namespace GUI {
class Shortcut { class Shortcut {
public: public:
Shortcut() {} Shortcut() { }
Shortcut(u8 modifiers, KeyCode key) Shortcut(u8 modifiers, KeyCode key)
: m_modifiers(modifiers) : m_modifiers(modifiers)
, m_key(key) , m_key(key)

View file

@ -102,7 +102,7 @@ private:
class VerticalSlider final : public Slider { class VerticalSlider final : public Slider {
C_OBJECT(VerticalSlider) C_OBJECT(VerticalSlider)
public: public:
virtual ~VerticalSlider() override {} virtual ~VerticalSlider() override { }
private: private:
VerticalSlider() VerticalSlider()
@ -114,7 +114,7 @@ private:
class HorizontalSlider final : public Slider { class HorizontalSlider final : public Slider {
C_OBJECT(HorizontalSlider) C_OBJECT(HorizontalSlider)
public: public:
virtual ~HorizontalSlider() override {} virtual ~HorizontalSlider() override { }
private: private:
HorizontalSlider() HorizontalSlider()

View file

@ -64,7 +64,7 @@ public:
void cursor_did_change(); void cursor_did_change();
protected: protected:
SyntaxHighlighter() {} SyntaxHighlighter() { }
WeakPtr<TextEditor> m_editor; WeakPtr<TextEditor> m_editor;

View file

@ -181,7 +181,7 @@ protected:
virtual void context_menu_event(ContextMenuEvent&) override; virtual void context_menu_event(ContextMenuEvent&) override;
virtual void resize_event(ResizeEvent&) override; virtual void resize_event(ResizeEvent&) override;
virtual void theme_change_event(ThemeChangeEvent&) override; virtual void theme_change_event(ThemeChangeEvent&) override;
virtual void cursor_did_change() {} virtual void cursor_did_change() { }
Gfx::IntRect ruler_content_rect(size_t line) const; Gfx::IntRect ruler_content_rect(size_t line) const;
TextPosition text_position_at(const Gfx::IntPoint&) const; TextPosition text_position_at(const Gfx::IntPoint&) const;

View file

@ -33,7 +33,7 @@ namespace GUI {
class TextPosition { class TextPosition {
public: public:
TextPosition() {} TextPosition() { }
TextPosition(size_t line, size_t column) TextPosition(size_t line, size_t column)
: m_line(line) : m_line(line)
, m_column(column) , m_column(column)

View file

@ -33,7 +33,7 @@ namespace GUI {
class TextRange { class TextRange {
public: public:
TextRange() {} TextRange() { }
TextRange(const TextPosition& start, const TextPosition& end) TextRange(const TextPosition& start, const TextPosition& end)
: m_start(start) : m_start(start)
, m_end(end) , m_end(end)

View file

@ -24,13 +24,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <LibGfx/Palette.h>
#include <LibGUI/Action.h> #include <LibGUI/Action.h>
#include <LibGUI/ActionGroup.h> #include <LibGUI/ActionGroup.h>
#include <LibGUI/BoxLayout.h> #include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h> #include <LibGUI/Button.h>
#include <LibGUI/Painter.h> #include <LibGUI/Painter.h>
#include <LibGUI/ToolBar.h> #include <LibGUI/ToolBar.h>
#include <LibGfx/Palette.h>
namespace GUI { namespace GUI {
@ -86,7 +86,7 @@ public:
set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed); set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
set_preferred_size(8, 18); set_preferred_size(8, 18);
} }
virtual ~SeparatorWidget() override {} virtual ~SeparatorWidget() override { }
virtual void paint_event(PaintEvent& event) override virtual void paint_event(PaintEvent& event) override
{ {
@ -111,9 +111,6 @@ void ToolBar::paint_event(PaintEvent& event)
Painter painter(*this); Painter painter(*this);
painter.add_clip_rect(event.rect()); painter.add_clip_rect(event.rect());
//if (m_has_frame)
// Gfx::StylePainter::paint_surface(painter, rect(), palette(), x() != 0, y() != 0);
// else
painter.fill_rect(event.rect(), palette().button()); painter.fill_rect(event.rect(), palette().button());
} }

View file

@ -27,9 +27,9 @@
#pragma once #pragma once
#include <AK/String.h> #include <AK/String.h>
#include <LibGfx/Font.h>
#include <LibGfx/Bitmap.h>
#include <LibGUI/Icon.h> #include <LibGUI/Icon.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Font.h>
namespace GUI { namespace GUI {

View file

@ -26,8 +26,8 @@
#include <AK/HashMap.h> #include <AK/HashMap.h>
#include <AK/String.h> #include <AK/String.h>
#include <LibGfx/Emoji.h>
#include <LibGfx/Bitmap.h> #include <LibGfx/Bitmap.h>
#include <LibGfx/Emoji.h>
namespace Gfx { namespace Gfx {

View file

@ -31,8 +31,8 @@
#include <AK/Optional.h> #include <AK/Optional.h>
#include <AK/String.h> #include <AK/String.h>
#include <AK/Vector.h> #include <AK/Vector.h>
#include <LibGfx/Point.h>
#include <LibGfx/Forward.h> #include <LibGfx/Forward.h>
#include <LibGfx/Point.h>
namespace Gfx { namespace Gfx {

View file

@ -34,7 +34,7 @@ namespace Gfx {
class ShareableBitmap { class ShareableBitmap {
public: public:
ShareableBitmap() {} ShareableBitmap() { }
explicit ShareableBitmap(const Gfx::Bitmap&); explicit ShareableBitmap(const Gfx::Bitmap&);
bool is_valid() const { return m_bitmap; } bool is_valid() const { return m_bitmap; }

View file

@ -35,7 +35,7 @@ namespace Gfx {
template<typename T> template<typename T>
class Size { class Size {
public: public:
Size() {} Size() { }
Size(T w, T h) Size(T w, T h)
: m_width(w) : m_width(w)

View file

@ -188,7 +188,7 @@ Optional<HttpRequest> HttpRequest::from_raw_request(const ByteBuffer& raw_reques
return request; return request;
} }
void HttpRequest::set_headers(const HashMap<String,String>& headers) void HttpRequest::set_headers(const HashMap<String, String>& headers)
{ {
for (auto& it : headers) for (auto& it : headers)
m_headers.append({ it.key, it.value }); m_headers.append({ it.key, it.value });