Skip to content

Commit

Permalink
change width&1 to width%2
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwendt committed Oct 18, 2022
1 parent 8c5a412 commit 3ad0f21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/include/cudf/strings/detail/pad_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ __device__ void pad_impl(cudf::string_view d_str,
if constexpr (side == side_type::BOTH) {
auto const pad_size = width - length;
// an odd width will right-justify
auto right_pad = (width & 1) ? pad_size / 2 : (pad_size - pad_size / 2);
auto right_pad = (width % 2) ? pad_size / 2 : (pad_size - pad_size / 2);
auto left_pad = pad_size - right_pad; // e.g. width=7: "++foxx+"; width=6: "+fox++"
while (left_pad-- > 0) {
output += from_char_utf8(fill_char, output);
Expand Down

0 comments on commit 3ad0f21

Please sign in to comment.