Skip to content

Commit a569ec3

Browse files
committed
Add back casts for msvc, only the const cast was not necessary
* ACE/ace/Time_Value.inl:
1 parent c716ddd commit a569ec3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ACE/ace/Time_Value.inl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ ACE_Time_Value::operator timeval () const
1010
// ACE_OS_TRACE ("ACE_Time_Value::operator timeval");
1111
#if defined (ACE_HAS_TIME_T_LONG_MISMATCH)
1212
// Recall that on some Windows we substitute another type for timeval in tv_
13-
this->ext_tv_.tv_sec = this->tv_.tv_sec;
14-
this->ext_tv_.tv_usec = this->tv_.tv_usec;
13+
this->ext_tv_.tv_sec = ACE_Utils::truncate_cast<long> (this->tv_.tv_sec);
14+
this->ext_tv_.tv_usec = ACE_Utils::truncate_cast<long> (this->tv_.tv_usec);
1515
return this->ext_tv_;
1616
#else
1717
return this->tv_;
@@ -41,8 +41,8 @@ ACE_Time_Value::operator const timeval * () const
4141
// ACE_OS_TRACE ("ACE_Time_Value::operator const timeval *");
4242
#if defined (ACE_HAS_TIME_T_LONG_MISMATCH)
4343
// Recall that on some Windows we substitute another type for timeval in tv_
44-
this->ext_tv_.tv_sec = this->tv_.tv_sec;
45-
this->ext_tv_.tv_usec = this->tv_.tv_usec;
44+
this->ext_tv_.tv_sec = ACE_Utils::truncate_cast<long> (this->tv_.tv_sec);
45+
this->ext_tv_.tv_usec = ACE_Utils::truncate_cast<long> (this->tv_.tv_usec);
4646
return (const timeval *) &this->ext_tv_;
4747
#else
4848
return (const timeval *) &this->tv_;

0 commit comments

Comments
 (0)