You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2016/08/23 16:47:46 UTC
mesos git commit: Removed an unnecessary call to stream.precision()
in Duration.
Repository: mesos
Updated Branches:
refs/heads/master a064505e4 -> 5b3f34e3c
Removed an unnecessary call to stream.precision() in Duration.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5b3f34e3
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5b3f34e3
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5b3f34e3
Branch: refs/heads/master
Commit: 5b3f34e3c6d60d1f8ba4fdc15088b0c9fbd69b14
Parents: a064505
Author: Jiang Yan Xu <xu...@apple.com>
Authored: Tue Aug 23 09:47:19 2016 -0700
Committer: Jiang Yan Xu <xu...@apple.com>
Committed: Tue Aug 23 09:47:19 2016 -0700
----------------------------------------------------------------------
3rdparty/stout/include/stout/duration.hpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5b3f34e3/3rdparty/stout/include/stout/duration.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/duration.hpp b/3rdparty/stout/include/stout/duration.hpp
index 575a53f..cd4f205 100644
--- a/3rdparty/stout/include/stout/duration.hpp
+++ b/3rdparty/stout/include/stout/duration.hpp
@@ -308,10 +308,8 @@ public:
inline std::ostream& operator<<(std::ostream& stream, const Duration& duration_)
{
- long precision = stream.precision();
-
- // Output the duration in full double precision.
- stream.precision(std::numeric_limits<double>::digits10);
+ // Output the duration in full double precision and save the old precision.
+ long precision = stream.precision(std::numeric_limits<double>::digits10);
// Parse the duration as the sign and the absolute value.
Duration duration = duration_;