|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56253 - in trunk/boost/spirit/home/karma: char detail numeric numeric/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-09-16 21:39:07
Author: hkaiser
Date: 2009-09-16 21:39:06 EDT (Wed, 16 Sep 2009)
New Revision: 56253
URL: http://svn.boost.org/trac/boost/changeset/56253
Log:
Spirit: fixed a couple of warnings
Text files modified:
trunk/boost/spirit/home/karma/char/char.hpp | 2 +-
trunk/boost/spirit/home/karma/char/char_class.hpp | 2 +-
trunk/boost/spirit/home/karma/detail/output_iterator.hpp | 8 ++++++++
trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp | 4 ++--
trunk/boost/spirit/home/karma/numeric/real.hpp | 4 ++--
5 files changed, 14 insertions(+), 6 deletions(-)
Modified: trunk/boost/spirit/home/karma/char/char.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/char/char.hpp (original)
+++ trunk/boost/spirit/home/karma/char/char.hpp 2009-09-16 21:39:06 EDT (Wed, 16 Sep 2009)
@@ -113,7 +113,7 @@
template <typename Attribute, typename CharParam, typename Context>
bool test(Attribute const& attr, CharParam& ch, Context&) const
{
- ch = attr;
+ ch = CharParam(attr);
return true;
}
Modified: trunk/boost/spirit/home/karma/char/char_class.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/char/char_class.hpp (original)
+++ trunk/boost/spirit/home/karma/char/char_class.hpp 2009-09-16 21:39:06 EDT (Wed, 16 Sep 2009)
@@ -125,7 +125,7 @@
template <typename Attribute, typename CharParam, typename Context>
bool test(Attribute const& attr, CharParam& ch, Context&) const
{
- ch = attr;
+ ch = CharParam(attr);
using spirit::char_class::classify;
return classify<char_encoding>::is(tag::space(), attr);
Modified: trunk/boost/spirit/home/karma/detail/output_iterator.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/output_iterator.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/output_iterator.hpp 2009-09-16 21:39:06 EDT (Wed, 16 Sep 2009)
@@ -449,12 +449,20 @@
return *this;
}
+#if defined(BOOST_MSVC)
+// 'argument' : conversion from '...' to '...', possible loss of data
+#pragma warning (push)
+#pragma warning (disable: 4244)
+#endif
template <typename T>
void operator=(T const& value)
{
if (this->base_iterator::output(value))
*sink = value;
}
+#if defined(BOOST_MSVC)
+#pragma warning (pop)
+#endif
// plain output iterators are considered to be good all the time
bool good() const { return true; }
Modified: trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp 2009-09-16 21:39:06 EDT (Wed, 16 Sep 2009)
@@ -102,7 +102,7 @@
template <>
struct absolute_value_helper<float>
{
- typedef long double result_type;
+ typedef float result_type;
static result_type call(float n)
{
return (spirit::detail::signbit)(n) ? -n : n;
@@ -112,7 +112,7 @@
template <>
struct absolute_value_helper<double>
{
- typedef long double result_type;
+ typedef double result_type;
static result_type call(double n)
{
return (spirit::detail::signbit)(n) ? -n : n;
Modified: trunk/boost/spirit/home/karma/numeric/real.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/real.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/real.hpp 2009-09-16 21:39:06 EDT (Wed, 16 Sep 2009)
@@ -344,7 +344,7 @@
template <typename Terminal>
result_type operator()(Terminal const& term, unused_type) const
{
- return result_type(fusion::at_c<0>(term.args)
+ return result_type(T(fusion::at_c<0>(term.args))
, karma::detail::get_policies<Policies>::call(term.term));
}
};
@@ -393,7 +393,7 @@
template <typename T_>
result_type operator()(T_ i, unused_type) const
{
- return result_type(i);
+ return result_type(T(i));
}
};
}
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