[mlpack] 15/30: Fix Log compatibility with std::fixed and std::setprecision
Barak A. Pearlmutter
barak+git at pearlmutter.net
Mon Dec 26 10:15:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit 620d8a16d21124731010fa1f3e4b5251575fb6ee
Author: shikhar <shikharbhardwaj68 at gmail.com>
Date: Thu Dec 15 23:56:06 2016 +0530
Fix Log compatibility with std::fixed and std::setprecision
Changes /src/mlpack/core/util/prefixedoutstream_impl.hpp
---
src/mlpack/core/util/prefixedoutstream_impl.hpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mlpack/core/util/prefixedoutstream_impl.hpp b/src/mlpack/core/util/prefixedoutstream_impl.hpp
index 75855ea..a81bbf1 100644
--- a/src/mlpack/core/util/prefixedoutstream_impl.hpp
+++ b/src/mlpack/core/util/prefixedoutstream_impl.hpp
@@ -44,6 +44,9 @@ void PrefixedOutStream::BaseLogic(const T& val)
PrefixIfNeeded();
std::ostringstream convert;
+ // Sync flags and precision with destination stream
+ convert.setf(destination.flags());
+ convert.precision(destination.precision());
convert << val;
if (convert.fail())
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list