diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-08-15 14:26:12 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-08-15 14:26:28 (GMT) |
commit | 1e5b6e73e6b5d2a4973174cda334fbc9ce47db91 (patch) | |
tree | bf92a77b580896f7df64037134bf3c21cfe2c2f8 /SwifTools | |
parent | a253c6305b75f0469f2607aae55a4ff827ccc153 (diff) | |
download | swift-1e5b6e73e6b5d2a4973174cda334fbc9ce47db91.zip swift-1e5b6e73e6b5d2a4973174cda334fbc9ce47db91.tar.bz2 |
Fixed warnings in SpellParser.
Change-Id: I8f44bab2f4d32e955e38e6e355824ca513b6a930
Diffstat (limited to 'SwifTools')
-rw-r--r-- | SwifTools/SpellParser.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/SwifTools/SpellParser.cpp b/SwifTools/SpellParser.cpp index 7208cdb..8cb42e4 100644 --- a/SwifTools/SpellParser.cpp +++ b/SwifTools/SpellParser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Vlad Voicu + * Copyright (c) 2011-2013 Vlad Voicu * Licensed under the Simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ @@ -9,6 +9,7 @@ #include <boost/spirit/include/lex_lexertl.hpp> #include <boost/bind.hpp> #include <boost/ref.hpp> +#include <boost/numeric/conversion/cast.hpp> #include <string> @@ -40,14 +41,14 @@ struct counter { switch (t.id()) { case ID_WWW: - position += t.value().size(); + position += boost::numeric_cast<size_t>(t.value().size()); break; case ID_HTTP: - position += t.value().size(); + position += boost::numeric_cast<size_t>(t.value().size()); break; case ID_WORD: // matched a word - wordPositions.push_back(boost::tuples::make_tuple(position, position + t.value().size())); - position += t.value().size(); + wordPositions.push_back(boost::tuples::make_tuple(position, position + boost::numeric_cast<size_t>(t.value().size()))); + position += boost::numeric_cast<size_t>(t.value().size()); break; case ID_CHAR: // match a simple char ++position; |