@@ -623,7 +623,9 @@ logfile::process_prefix(shared_buffer_ref& sbr,
623623 || li.li_utf8_scan_result .usr_has_ansi );
624624 }
625625 if (prescan_size > 0 && this ->lf_index .size () >= prescan_size
626- && prescan_time != this ->lf_index [prescan_size - 1 ].get_time <std::chrono::microseconds>())
626+ && prescan_time
627+ != this ->lf_index [prescan_size - 1 ]
628+ .get_time <std::chrono::microseconds>())
627629 {
628630 retval = true ;
629631 }
@@ -931,8 +933,7 @@ logfile::rebuild_index(std::optional<ui_clock::time_point> deadline)
931933 this ->lf_notes .writeAccess ()->emplace (note_type::not_utf,
932934 note_um);
933935 if (this ->lf_logfile_observer != nullptr ) {
934- this ->lf_logfile_observer ->logfile_indexing (
935- this ->shared_from_this (), 0 , 0 );
936+ this ->lf_logfile_observer ->logfile_indexing (this , 0 , 0 );
936937 }
937938 break ;
938939 }
@@ -1030,7 +1031,7 @@ logfile::rebuild_index(std::optional<ui_clock::time_point> deadline)
10301031
10311032 if (this ->lf_logfile_observer != nullptr ) {
10321033 auto indexing_res = this ->lf_logfile_observer ->logfile_indexing (
1033- this -> shared_from_this () ,
1034+ this ,
10341035 this ->lf_line_buffer .get_read_offset (
10351036 li.li_file_range .next_offset ()),
10361037 st.st_size );
@@ -1086,7 +1087,7 @@ logfile::rebuild_index(std::optional<ui_clock::time_point> deadline)
10861087 }
10871088
10881089 for (const auto & pd : this ->lf_applicable_partitioners ) {
1089- static thread_local auto part_md
1090+ thread_local auto part_md
10901091 = lnav::pcre2pp::match_data::unitialized ();
10911092
10921093 auto curr_ll = this ->end () - 1 ;
@@ -1146,8 +1147,7 @@ logfile::rebuild_index(std::optional<ui_clock::time_point> deadline)
11461147 this ->lf_notes .writeAccess ()->emplace (note_type::indexing_disabled,
11471148 note_um);
11481149 if (this ->lf_logfile_observer != nullptr ) {
1149- this ->lf_logfile_observer ->logfile_indexing (
1150- this ->shared_from_this (), 0 , 0 );
1150+ this ->lf_logfile_observer ->logfile_indexing (this , 0 , 0 );
11511151 }
11521152 }
11531153
@@ -1219,7 +1219,8 @@ logfile::rebuild_index(std::optional<ui_clock::time_point> deadline)
12191219 this ->lf_sort_needed = false ;
12201220 }
12211221
1222- this ->lf_index_time = std::chrono::seconds{this ->lf_line_buffer .get_file_time ()};
1222+ this ->lf_index_time
1223+ = std::chrono::seconds{this ->lf_line_buffer .get_file_time ()};
12231224 if (this ->lf_index_time .count () == 0 ) {
12241225 this ->lf_index_time = std::chrono::seconds{st.st_mtime };
12251226 }
@@ -1355,7 +1356,7 @@ logfile::reobserve_from(iterator iter)
13551356
13561357 if (this ->lf_logfile_observer != nullptr ) {
13571358 auto indexing_res = this ->lf_logfile_observer ->logfile_indexing (
1358- this -> shared_from_this () , offset, this ->size ());
1359+ this , offset, this ->size ());
13591360 if (indexing_res == logfile_observer::indexing_result::BREAK) {
13601361 break ;
13611362 }
@@ -1373,7 +1374,7 @@ logfile::reobserve_from(iterator iter)
13731374 }
13741375 if (this ->lf_logfile_observer != nullptr ) {
13751376 this ->lf_logfile_observer ->logfile_indexing (
1376- this -> shared_from_this () , this ->size (), this ->size ());
1377+ this , this ->size (), this ->size ());
13771378 this ->lf_logline_observer ->logline_eof (*this );
13781379 }
13791380}
@@ -1685,4 +1686,3 @@ logfile::estimated_remaining_lines() const
16851686
16861687 return remaining_bytes / bytes_per_line;
16871688}
1688-
0 commit comments