Skip to content

Commit

Permalink
Use size_t{_V_pos}.
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Guteniev <[email protected]>
  • Loading branch information
StephanTLavavej and AlexGuteniev committed Apr 4, 2023
1 parent daf094b commit 3589b28
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions stl/src/vector_algorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,7 @@ namespace {
_BitScanForward(&_H_pos, _Mask); // lgtm [cpp/conditionallyuninitializedvariable]

const auto _V_pos = _Traits::_Get_v_pos(_Cur_idx_min, _H_pos); // Extract its vertical index
_Res._Min =
_Base + static_cast<size_t>(_V_pos) * 16 + _H_pos; // Finally, compute the pointer
_Res._Min = _Base + size_t{_V_pos} * 16 + _H_pos; // Finally, compute the pointer
}
}

Expand Down Expand Up @@ -931,8 +930,7 @@ namespace {
}

const auto _V_pos = _Traits::_Get_v_pos(_Cur_idx_max, _H_pos); // Extract its vertical index
_Res._Max =
_Base + static_cast<size_t>(_V_pos) * 16 + _H_pos; // Finally, compute the pointer
_Res._Max = _Base + size_t{_V_pos} * 16 + _H_pos; // Finally, compute the pointer
}
}
// Horizontal part done, results are saved, now need to see if there is another portion to process
Expand Down

0 comments on commit 3589b28

Please sign in to comment.