Skip to content

Commit

Permalink
chore: fix build on mac m1 (#6560)
Browse files Browse the repository at this point in the history
close #6559
  • Loading branch information
LittleFall authored Dec 29, 2022
1 parent c9eb6e6 commit 4c8877e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbms/src/Common/OptimizedRegularExpression.inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ void OptimizedRegularExpressionImpl<thread_safe>::replaceAllImpl(const char * su
if (!success)
break;

auto skipped_byte_size = reinterpret_cast<Int64>(matched_str.data() - (subject + prior_offset));
auto skipped_byte_size = static_cast<Int64>(matched_str.data() - (subject + prior_offset));
res_data.resize(res_data.size() + skipped_byte_size);
memcpy(&res_data[res_offset], subject + prior_offset, skipped_byte_size); // copy the skipped bytes
res_offset += skipped_byte_size;
Expand Down Expand Up @@ -658,7 +658,7 @@ void OptimizedRegularExpressionImpl<thread_safe>::replaceOneImpl(const char * su
--occur;
}

auto prefix_byte_size = reinterpret_cast<Int64>(matched_str.data() - subject);
auto prefix_byte_size = static_cast<Int64>(matched_str.data() - subject);
res_data.resize(res_data.size() + prefix_byte_size);
memcpy(&res_data[res_offset], subject, prefix_byte_size); // Copy prefix string
res_offset += prefix_byte_size;
Expand Down

0 comments on commit 4c8877e

Please sign in to comment.