Skip to content

Commit

Permalink
fix implicit cast
Browse files Browse the repository at this point in the history
  • Loading branch information
js8544 committed Dec 16, 2023
1 parent 5916147 commit ddcaaeb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2593,7 +2593,8 @@ struct SliceBytesTransform : StringSliceTransformBase {
if ((start >= stop and step > 0) || (start <= stop and step < 0) || start == stop) {
return 0;
}
return std::max(0L, (stop - start + (step - (step > 0 ? 1 : -1))) / step);
return static_cast<int32_t>(
std::max(0L, (stop - start + (step - (step > 0 ? 1 : -1))) / step));
}
};

Expand Down

0 comments on commit ddcaaeb

Please sign in to comment.