Skip to content

Commit

Permalink
Use C++ style cast
Browse files Browse the repository at this point in the history
  • Loading branch information
boneanxs committed Dec 12, 2024
1 parent eb494af commit a8ca595
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions velox/type/Timestamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ struct Timestamp {
// Timestamp(-9223372036855, 224'192'000).

// If the final result does not fit in int64_t we throw.
__int128_t result =
(__int128_t)seconds_ * 1'000'000 + (int64_t)(nanos_ / 1'000);
__int128_t result = static_cast<__int128_t>(seconds_) * 1'000'000 +
static_cast<int64_t>(nanos_ / 1'000);
if (result < INT64_MIN || result > INT64_MAX) {
VELOX_USER_FAIL(
"Could not convert Timestamp({}, {}) to microseconds",
Expand Down

0 comments on commit a8ca595

Please sign in to comment.