cast expression
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
f2c879333e
commit
393150c0cd
@ -994,7 +994,7 @@ std::ostream& TimeValue::write(std::ostream& os) const {
|
||||
|
||||
int64_t TimeValue::toInt64(size_t /*n*/) const {
|
||||
// Returns number of seconds in the day in UTC.
|
||||
int64_t result = (time_.hour - time_.tzHour) * 60 * 60;
|
||||
auto result = static_cast<int64_t>(time_.hour - time_.tzHour) * 60 * 60;
|
||||
result += (time_.minute - time_.tzMinute) * 60;
|
||||
result += time_.second;
|
||||
if (result < 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user