|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81531 - trunk/boost/thread/pthread
From: vicente.botet_at_[hidden]
Date: 2012-11-25 13:25:35
Author: viboes
Date: 2012-11-25 13:25:35 EST (Sun, 25 Nov 2012)
New Revision: 81531
URL: http://svn.boost.org/trac/boost/changeset/81531
Log:
Thread: fix conversion when sizeof(intmax_t)>sizeof(ts.tv_sec).
Text files modified:
trunk/boost/thread/pthread/timespec.hpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Modified: trunk/boost/thread/pthread/timespec.hpp
==============================================================================
--- trunk/boost/thread/pthread/timespec.hpp (original)
+++ trunk/boost/thread/pthread/timespec.hpp 2012-11-25 13:25:35 EST (Sun, 25 Nov 2012)
@@ -65,7 +65,7 @@
}
inline boost::intmax_t to_nanoseconds_int_max(timespec const& ts)
{
- return ts.tv_sec * 1000000000l + ts.tv_nsec;
+ return static_cast<boost::intmax_t>(ts.tv_sec) * 1000000000l + ts.tv_nsec;
}
inline bool timespec_ge_zero(timespec const& ts)
{
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