1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +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

@ -233,7 +233,7 @@ Vector<String> HackStudioWidget::read_recent_projects()
return paths;
}
void HackStudioWidget::open_project(const String& root_path)
void HackStudioWidget::open_project(String const& root_path)
{
if (warn_unsaved_changes("There are unsaved changes, do you want to save before closing current project?") == ContinueDecision::No)
return;
@ -300,7 +300,7 @@ Vector<String> HackStudioWidget::selected_file_paths() const
return files;
}
bool HackStudioWidget::open_file(const String& full_filename, size_t line, size_t column)
bool HackStudioWidget::open_file(String const& full_filename, size_t line, size_t column)
{
String filename = full_filename;
if (full_filename.starts_with(project().root_path())) {
@ -972,7 +972,7 @@ void HackStudioWidget::initialize_debugger()
{
Debugger::initialize(
m_project->root_path(),
[this](const PtraceRegisters& regs) {
[this](PtraceRegisters const& regs) {
VERIFY(Debugger::the().session());
const auto& debug_session = *Debugger::the().session();
auto source_position = debug_session.get_source_position(regs.ip());
@ -1025,7 +1025,7 @@ void HackStudioWidget::initialize_debugger()
});
}
String HackStudioWidget::get_full_path_of_serenity_source(const String& file)
String HackStudioWidget::get_full_path_of_serenity_source(String const& file)
{
auto path_parts = LexicalPath(file).parts();
while (!path_parts.is_empty() && path_parts[0] == "..") {
@ -1038,7 +1038,7 @@ String HackStudioWidget::get_full_path_of_serenity_source(const String& file)
return String::formatted("{}/{}", serenity_sources_base, relative_path_builder.to_string());
}
String HackStudioWidget::get_absolute_path(const String& path) const
String HackStudioWidget::get_absolute_path(String const& path) const
{
// TODO: We can probably do a more specific condition here, something like
// "if (file.starts_with("../Libraries/") || file.starts_with("../AK/"))"
@ -1048,7 +1048,7 @@ String HackStudioWidget::get_absolute_path(const String& path) const
return m_project->to_absolute_path(path);
}
RefPtr<EditorWrapper> HackStudioWidget::get_editor_of_file(const String& filename)
RefPtr<EditorWrapper> HackStudioWidget::get_editor_of_file(String const& filename)
{
String file_path = filename;
@ -1261,7 +1261,7 @@ void HackStudioWidget::create_action_tab(GUI::Widget& parent)
m_disassembly_widget = m_action_tab_widget->add_tab<DisassemblyWidget>("Disassembly");
m_git_widget = m_action_tab_widget->add_tab<GitWidget>("Git", m_project->root_path());
m_git_widget->set_view_diff_callback([this](const auto& original_content, const auto& diff) {
m_git_widget->set_view_diff_callback([this](auto const& original_content, auto const& diff) {
m_diff_viewer->set_content(original_content, diff);
set_edit_mode(EditMode::Diff);
});
@ -1497,7 +1497,7 @@ void HackStudioWidget::update_statusbar()
m_statusbar->set_text(2, String::formatted("Ln {}, Col {}", current_editor().cursor().line() + 1, current_editor().cursor().column()));
}
void HackStudioWidget::handle_external_file_deletion(const String& filepath)
void HackStudioWidget::handle_external_file_deletion(String const& filepath)
{
close_file_in_all_editors(filepath);
}
@ -1534,7 +1534,7 @@ HackStudioWidget::~HackStudioWidget()
stop_debugger_if_running();
}
HackStudioWidget::ContinueDecision HackStudioWidget::warn_unsaved_changes(const String& prompt)
HackStudioWidget::ContinueDecision HackStudioWidget::warn_unsaved_changes(String const& prompt)
{
if (!any_document_is_dirty())
return ContinueDecision::Yes;