Skip to content

Commit

Permalink
[clang-tidy] fix cppcoreguidelines-prefer-member-initializer and cppc…
Browse files Browse the repository at this point in the history
…oreguidelines-misleading-capture-default-by-value
  • Loading branch information
jonathanpoelen committed Mar 14, 2024
1 parent b7aa0d9 commit dfd0cf6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions src/capture/fdx_capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,14 @@ std::string TflSuffixGenerator::name_at(uint64_t i)

FdxNameGenerator::FdxNameGenerator(
std::string_view record_path, std::string_view hash_path, std::string_view sid)
: record_path(str_concat(record_path, '/', sid, '/', sid))
, hash_path(str_concat(hash_path,
array_view(this->record_path).drop_front(record_path.size())))
, pos_start_basename(checked_int(this->record_path.size() - sid.size()))
, pos_start_relative_path(checked_int(this->pos_start_basename - sid.size() - 1))
, pos_end_record_suffix(checked_int(this->record_path.size()))
, pos_end_hash_suffix(checked_int(this->hash_path.size()))
{
str_append(this->record_path, record_path, '/', sid, '/', sid);
str_append(this->hash_path, hash_path,
array_view(this->record_path).drop_front(record_path.size()));

this->pos_end_record_suffix = checked_int(this->record_path.size());
this->pos_end_hash_suffix = checked_int(this->hash_path.size());
this->pos_start_basename = checked_int(this->pos_end_record_suffix - sid.size());
this->pos_start_relative_path = checked_int(this->pos_start_basename - sid.size() - 1);
}

void FdxNameGenerator::next_tfl()
Expand Down
2 changes: 1 addition & 1 deletion src/mod/internal/widget/vertical_scroll_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ void WidgetVerticalScrollText::rdp_input_invalidate(Rect clip)
auto const sx = int16_t(rx + rw - bw);
auto const cy = int16_t(this->cursor_button_y + ry);

auto draw_button_borders = [=, this](int16_t y, uint16_t bh){
auto draw_button_borders = [this, sx, bw, opaque_rect](int16_t y, uint16_t bh){
// top
opaque_rect(Rect(sx, y, bw, 2), this->fg_color);
// bottom
Expand Down

0 comments on commit dfd0cf6

Please sign in to comment.