diff options
Diffstat (limited to 'SwifTools/SpellParser.cpp')
| -rw-r--r-- | SwifTools/SpellParser.cpp | 11 |
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 | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (c) 2016 Isode Limited. | 8 | * Copyright (c) 2016-2018 Isode Limited. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * See the COPYING file for more information. | 10 | * See the COPYING file for more information. |
| 11 | */ | 11 | */ |
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <string> | 15 | #include <string> |
| 16 | 16 | ||
| 17 | #include <boost/bind.hpp> | 17 | #include <boost/bind.hpp> |
| 18 | #include <boost/numeric/conversion/cast.hpp> | ||
| 19 | #include <boost/ref.hpp> | 18 | #include <boost/ref.hpp> |
| 20 | #include <boost/spirit/include/lex_lexertl.hpp> | 19 | #include <boost/spirit/include/lex_lexertl.hpp> |
| 21 | 20 | ||
| @@ -47,14 +46,14 @@ struct counter | |||
| 47 | { | 46 | { |
| 48 | switch (t.id()) { | 47 | switch (t.id()) { |
| 49 | case ID_WWW: | 48 | case ID_WWW: |
| 50 | position += boost::numeric_cast<size_t>(t.value().size()); | 49 | position += static_cast<std::size_t>(t.value().size()); |
| 51 | break; | 50 | break; |
| 52 | case ID_HTTP: | 51 | case ID_HTTP: |
| 53 | position += boost::numeric_cast<size_t>(t.value().size()); | 52 | position += static_cast<std::size_t>(t.value().size()); |
| 54 | break; | 53 | break; |
| 55 | case ID_WORD: // matched a word | 54 | case ID_WORD: // matched a word |
| 56 | wordPositions.push_back(boost::tuples::make_tuple(position, position + boost::numeric_cast<size_t>(t.value().size()))); | 55 | wordPositions.push_back(boost::tuples::make_tuple(position, position + static_cast<std::size_t>(t.value().size()))); |
| 57 | position += boost::numeric_cast<size_t>(t.value().size()); | 56 | position += static_cast<std::size_t>(t.value().size()); |
| 58 | break; | 57 | break; |
| 59 | case ID_CHAR: // match a simple char | 58 | case ID_CHAR: // match a simple char |
| 60 | ++position; | 59 | ++position; |
Swift