Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61293 - trunk/boost/date_time
From: andrey.semashev_at_[hidden]
Date: 2010-04-15 11:23:58


Author: andysem
Date: 2010-04-15 11:23:56 EDT (Thu, 15 Apr 2010)
New Revision: 61293
URL: http://svn.boost.org/trac/boost/changeset/61293

Log:
Refs #2757. Added explicit casts to avoid warnings on MSVC.
Text files modified:
   trunk/boost/date_time/microsec_time_clock.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 deletions(-)

Modified: trunk/boost/date_time/microsec_time_clock.hpp
==============================================================================
--- trunk/boost/date_time/microsec_time_clock.hpp (original)
+++ trunk/boost/date_time/microsec_time_clock.hpp 2010-04-15 11:23:56 EDT (Thu, 15 Apr 2010)
@@ -98,9 +98,9 @@
 
       std::tm curr;
       std::tm* curr_ptr = converter(&t, &curr);
- date_type d(curr_ptr->tm_year + 1900,
- curr_ptr->tm_mon + 1,
- curr_ptr->tm_mday);
+ date_type d(static_cast< typename date_type::year_type::value_type >(curr_ptr->tm_year + 1900),
+ static_cast< typename date_type::month_type::value_type >(curr_ptr->tm_mon + 1),
+ static_cast< typename date_type::day_type::value_type >(curr_ptr->tm_mday));
 
       //The following line will adjust the fractional second tick in terms
       //of the current time system. For example, if the time system
@@ -108,9 +108,9 @@
       //and all the fractional seconds return 0.
       int adjust = static_cast< int >(resolution_traits_type::res_adjust() / 1000000);
 
- time_duration_type td(curr_ptr->tm_hour,
- curr_ptr->tm_min,
- curr_ptr->tm_sec,
+ time_duration_type td(static_cast< typename time_duration_type::hour_type >(curr_ptr->tm_hour),
+ static_cast< typename time_duration_type::min_type >(curr_ptr->tm_min),
+ static_cast< typename time_duration_type::sec_type >(curr_ptr->tm_sec),
                             sub_sec * adjust);
 
       return time_type(d,td);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk