Compare commits

...

2 Commits

Author SHA1 Message Date
800560693b update 2024-09-18 21:59:10 +08:00
eb041b209e fixed bug 2024-09-18 21:58:32 +08:00

View File

@ -79,11 +79,12 @@ int main()
// string l = "";
auto now_buf_pos = input_file_stream.tellg();
const auto get_buf_len = [&](){
const auto get_buf_len = [&now_buf_pos,&input_file_stream,&buf](){
if(const auto new_buf_pos = input_file_stream.tellg(); new_buf_pos!=-1)[[likely]]{
const auto old_buf_pos = now_buf_pos;
now_buf_pos = new_buf_pos;
return (unsigned long long)(old_buf_pos-new_buf_pos);
// auto ret = new_buf_pos - old_buf_pos;
return (unsigned long long)(new_buf_pos - old_buf_pos);
}else{
return strlen(buf.data());
}