summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/SpellParser.cpp')
-rw-r--r--SwifTools/SpellParser.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/SwifTools/SpellParser.cpp b/SwifTools/SpellParser.cpp
index 5bafa6e..e449b45 100644
--- a/SwifTools/SpellParser.cpp
+++ b/SwifTools/SpellParser.cpp
@@ -3,21 +3,20 @@
* Licensed under the Simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
/*
- * Copyright (c) 2016 Isode Limited.
+ * Copyright (c) 2016-2018 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <SwifTools/SpellParser.h>
#include <string>
#include <boost/bind.hpp>
-#include <boost/numeric/conversion/cast.hpp>
#include <boost/ref.hpp>
#include <boost/spirit/include/lex_lexertl.hpp>
namespace lex = boost::spirit::lex;
@@ -45,18 +44,18 @@ struct counter
template <typename Token>
bool operator()(Token const& t, PositionPairList& wordPositions, std::size_t& position) const
{
switch (t.id()) {
case ID_WWW:
- position += boost::numeric_cast<size_t>(t.value().size());
+ position += static_cast<std::size_t>(t.value().size());
break;
case ID_HTTP:
- position += boost::numeric_cast<size_t>(t.value().size());
+ position += static_cast<std::size_t>(t.value().size());
break;
case ID_WORD: // matched a word
- 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());
+ wordPositions.push_back(boost::tuples::make_tuple(position, position + static_cast<std::size_t>(t.value().size())));
+ position += static_cast<std::size_t>(t.value().size());
break;
case ID_CHAR: // match a simple char
++position;
break;
}