Skip to content

Commit

Permalink
Fix MSVC truncation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
benibus committed Jul 10, 2023
1 parent 1f59a82 commit bc91e65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/parquet/arrow/test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ ::arrow::enable_if_floating_point<ArrowType, Status> NullableArray(
std::vector<c_type> values;
if constexpr (::arrow::is_half_float_type<ArrowType>::value) {
std::vector<int16_t> signed_values;
constexpr int16_t min = 0xf0e2; // -1e4
constexpr int16_t max = 0x70e2; // +1e4
constexpr auto min = static_cast<int16_t>(0xf0e2); // -1e4
constexpr auto max = static_cast<int16_t>(0x70e2); // +1e4
::arrow::randint(size, min, max, &signed_values);
std::transform(signed_values.begin(), signed_values.end(), std::back_inserter(values),
[](int16_t v) { return static_cast<uint16_t>(v); });
Expand Down

0 comments on commit bc91e65

Please sign in to comment.