1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 04:27: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

@ -235,7 +235,7 @@ static inline int note_from_white_keys(int white_keys)
return note;
}
int KeysWidget::note_for_event_position(const Gfx::IntPoint& a_point) const
int KeysWidget::note_for_event_position(Gfx::IntPoint const& a_point) const
{
if (!frame_inner_rect().contains(a_point))
return -1;

View file

@ -32,7 +32,7 @@ private:
virtual void mouseup_event(GUI::MouseEvent&) override;
virtual void mousemove_event(GUI::MouseEvent&) override;
int note_for_event_position(const Gfx::IntPoint&) const;
int note_for_event_position(Gfx::IntPoint const&) const;
TrackManager& m_track_manager;

View file

@ -160,7 +160,7 @@ constexpr int beats_per_bar = 4;
constexpr int notes_per_beat = 4;
constexpr int roll_length = (sample_rate / (beats_per_minute / 60)) * beats_per_bar;
constexpr const char* note_names[] = {
constexpr char const* note_names[] = {
"C",
"C#",
"D",

View file

@ -152,7 +152,7 @@ void RollWidget::paint_event(GUI::PaintEvent& event)
}
Gfx::IntRect note_name_rect(3, y, 1, note_height);
const char* note_name = note_names[note % notes_per_octave];
char const* note_name = note_names[note % notes_per_octave];
painter.draw_text(note_name_rect, note_name, Gfx::TextAlignment::CenterLeft);
note_name_rect.translate_by(Gfx::FontDatabase::default_font().width(note_name) + 2, 0);

View file

@ -22,8 +22,8 @@ class RollWidget final : public GUI::AbstractScrollableWidget {
public:
virtual ~RollWidget() override = default;
const KeysWidget* keys_widget() const { return m_keys_widget; }
void set_keys_widget(const KeysWidget* widget) { m_keys_widget = widget; }
KeysWidget const* keys_widget() const { return m_keys_widget; }
void set_keys_widget(KeysWidget const* widget) { m_keys_widget = widget; }
private:
explicit RollWidget(TrackManager&);
@ -36,7 +36,7 @@ private:
bool viewport_changed() const;
TrackManager& m_track_manager;
const KeysWidget* m_keys_widget;
KeysWidget const* m_keys_widget;
int m_roll_width { 0 };
int m_num_notes { 0 };

View file

@ -16,7 +16,7 @@
#include <LibDSP/Music.h>
#include <math.h>
Track::Track(const u32& time)
Track::Track(u32 const& time)
: m_time(time)
, m_temporary_transport(LibDSP::Transport::construct(120, 4))
, m_delay(make_ref_counted<LibDSP::Effects::Delay>(m_temporary_transport))

View file

@ -26,11 +26,11 @@ class Track {
AK_MAKE_NONMOVABLE(Track);
public:
explicit Track(const u32& time);
explicit Track(u32 const& time);
~Track() = default;
const Vector<Audio::Sample>& recorded_sample() const { return m_recorded_sample; }
const SinglyLinkedList<RollNote>& roll_notes(int note) const { return m_roll_notes[note]; }
Vector<Audio::Sample> const& recorded_sample() const { return m_recorded_sample; }
SinglyLinkedList<RollNote> const& roll_notes(int note) const { return m_roll_notes[note]; }
int volume() const { return m_volume; }
NonnullRefPtr<LibDSP::Synthesizers::Classic> synth() { return m_synth; }
NonnullRefPtr<LibDSP::Effects::Delay> delay() { return m_delay; }
@ -51,7 +51,7 @@ private:
int m_volume;
const u32& m_time;
u32 const& m_time;
NonnullRefPtr<LibDSP::Transport> m_temporary_transport;
NonnullRefPtr<LibDSP::Effects::Delay> m_delay;