From 0410bacdf60bc431e457aff340a71014c0108221 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 4 Mar 2023 03:51:14 +0100 Subject: [PATCH] clang-format C++ files --- src/parser.cpp | 6 ++---- src/parser.h | 2 +- src/proc.cpp | 8 ++------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/parser.cpp b/src/parser.cpp index c3f319cf4..ba137284e 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -491,7 +491,7 @@ job_t *parser_t::job_get_from_pid(pid_t pid) const { return job_get_from_pid(pid, job_pos); } -job_t *parser_t::job_get_from_pid(int64_t pid, size_t& job_pos) const { +job_t *parser_t::job_get_from_pid(int64_t pid, size_t &job_pos) const { for (auto it = job_list.begin(); it != job_list.end(); ++it) { for (const process_ptr_t &p : (*it)->processes) { if (p->pid == pid) { @@ -807,6 +807,4 @@ block_t block_t::scope_block(block_type_t type) { block_t block_t::breakpoint_block() { return block_t(block_type_t::breakpoint); } block_t block_t::variable_assignment_block() { return block_t(block_type_t::variable_assignment); } -void block_t::ffi_incr_event_blocks() { - ++event_blocks; -} +void block_t::ffi_incr_event_blocks() { ++event_blocks; } diff --git a/src/parser.h b/src/parser.h index 0636f8d13..8a8279ae0 100644 --- a/src/parser.h +++ b/src/parser.h @@ -433,7 +433,7 @@ class parser_t : public std::enable_shared_from_this { job_t *job_get_from_pid(pid_t pid) const; /// Returns the job and position with the given pid. - job_t *job_get_from_pid(int64_t pid, size_t& job_pos) const; + job_t *job_get_from_pid(int64_t pid, size_t &job_pos) const; /// Returns a new profile item if profiling is active. The caller should fill it in. /// The parser_t will deallocate it. diff --git a/src/proc.cpp b/src/proc.cpp index ae6253606..1a2bbae11 100644 --- a/src/proc.cpp +++ b/src/proc.cpp @@ -176,13 +176,9 @@ RustFFIProcList job_t::ffi_processes() const { return RustFFIProcList{const_cast(processes.data()), processes.size()}; } -const job_group_t& job_t::ffi_group() const { - return *group; -} +const job_group_t &job_t::ffi_group() const { return *group; } -bool job_t::ffi_resume() const { - return const_cast(this)->resume(); -} +bool job_t::ffi_resume() const { return const_cast(this)->resume(); } void internal_proc_t::mark_exited(proc_status_t status) { assert(!exited() && "Process is already exited");