1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:17:45 +00:00

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -24,8 +24,8 @@
#include <stdlib.h>
#include <unistd.h>
const int WIDTH = 200;
const int HEIGHT = 200;
int const WIDTH = 200;
int const HEIGHT = 200;
static bool flag_hide_window_frame = false;
@ -97,7 +97,7 @@ void Cube::timer_event(Core::TimerEvent&)
#define QUAD(a, b, c, d) a, b, c, c, d, a
const int indices[] {
int const indices[] {
QUAD(0, 1, 2, 3),
QUAD(7, 6, 5, 4),
QUAD(4, 5, 1, 0),
@ -141,7 +141,7 @@ void Cube::timer_event(Core::TimerEvent&)
else
painter.clear_rect(m_bitmap->rect(), Gfx::Color::Transparent);
auto to_point = [](const FloatVector3& v) {
auto to_point = [](FloatVector3 const& v) {
return Gfx::IntPoint(v.x(), v.y());
};

View file

@ -21,8 +21,8 @@
#include <LibMain/Main.h>
#include <unistd.h>
const int WIDTH = 780;
const int HEIGHT = 600;
int const WIDTH = 780;
int const HEIGHT = 600;
class Canvas final : public GUI::Widget {
C_OBJECT(Canvas)

View file

@ -24,8 +24,8 @@
#include <LibMain/Main.h>
#include <unistd.h>
const int WIDTH = 300;
const int HEIGHT = 200;
int const WIDTH = 300;
int const HEIGHT = 200;
class Canvas final : public GUI::Widget {
C_OBJECT(Canvas)

View file

@ -85,8 +85,8 @@ public:
double mandelbrot(double px, double py, i32 max_iterations)
{
// Based on https://en.wikipedia.org/wiki/Plotting_algorithms_for_the_Mandelbrot_set
const double x0 = px * (m_x_end - m_x_start) / m_bitmap->width() + m_x_start;
const double y0 = py * (m_y_end - m_y_start) / m_bitmap->height() + m_y_start;
double const x0 = px * (m_x_end - m_x_start) / m_bitmap->width() + m_x_start;
double const y0 = py * (m_y_end - m_y_start) / m_bitmap->height() + m_y_start;
double x = 0;
double y = 0;
i32 iteration = 0;
@ -215,7 +215,7 @@ class Mandelbrot : public GUI::Frame {
In,
Out,
};
void zoom(Zoom in_out, const Gfx::IntPoint& center);
void zoom(Zoom in_out, Gfx::IntPoint const& center);
void reset();
@ -239,7 +239,7 @@ private:
MandelbrotSet m_set;
};
void Mandelbrot::zoom(Zoom in_out, const Gfx::IntPoint& center)
void Mandelbrot::zoom(Zoom in_out, Gfx::IntPoint const& center)
{
static constexpr double zoom_in_multiplier = 0.8;
static constexpr double zoom_out_multiplier = 1.25;

View file

@ -56,7 +56,7 @@ GalleryWidget::GalleryWidget()
m_frame_shape_combobox = basics_tab->find_descendant_of_type_named<GUI::ComboBox>("frame_shape_combobox");
m_frame_shape_combobox->set_model(*GUI::ItemListModel<String>::create(m_frame_shapes));
m_frame_shape_combobox->on_change = [&](auto&, const auto& index) {
m_frame_shape_combobox->on_change = [&](auto&, auto const& index) {
m_label_frame->set_frame_shape(static_cast<Gfx::FrameShape>((index.row() - 1) % 3 + 1));
m_label_frame->set_frame_shadow(static_cast<Gfx::FrameShadow>((index.row() - 1) / 3));
m_label_frame->update();
@ -153,7 +153,7 @@ GalleryWidget::GalleryWidget()
m_msgbox_icon_combobox->set_model(*GUI::ItemListModel<String>::create(m_msgbox_icons));
m_msgbox_icon_combobox->set_selected_index(0);
m_msgbox_icon_combobox->on_change = [&](auto&, const auto& index) {
m_msgbox_icon_combobox->on_change = [&](auto&, auto const& index) {
m_msgbox_type = static_cast<GUI::MessageBox::Type>(index.row());
};
@ -161,7 +161,7 @@ GalleryWidget::GalleryWidget()
m_msgbox_buttons_combobox->set_model(*GUI::ItemListModel<String>::create(m_msgbox_buttons));
m_msgbox_buttons_combobox->set_selected_index(0);
m_msgbox_buttons_combobox->on_change = [&](auto&, const auto& index) {
m_msgbox_buttons_combobox->on_change = [&](auto&, auto const& index) {
m_msgbox_input_type = static_cast<GUI::MessageBox::InputType>(index.row());
};
@ -237,7 +237,7 @@ GalleryWidget::GalleryWidget()
m_wizard_output = wizards_tab->find_descendant_of_type_named<GUI::TextEditor>("wizard_output");
m_wizard_output->set_should_hide_unnecessary_scrollbars(true);
const char* serenityos_ascii = {
char const* serenityos_ascii = {
" ____ _ __ ____ ____\n"
" / __/__ _______ ___ (_) /___ __/ __ \\/ __/\n"
" _\\ \\/ -_) __/ -_) _ \\/ / __/ // / /_/ /\\ \\\n"
@ -245,7 +245,7 @@ GalleryWidget::GalleryWidget()
" /___/\n"
};
const char* wizard_ascii = {
char const* wizard_ascii = {
" _,-'|\n"
" ,-'._ |\n"
" .||, |####\\ |\n"