summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-05-13 14:23:07 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-05-13 18:43:38 +0200
commit26f0fd4cc6577e52b08604d32469b221242bfb9c (patch)
treeb63d2936ac57352a0cb3a4a863cc735dacedaf1c /src/input_handler.cc
parent56ab33c9d6dc0255bf15ebd1fbc216766ffb247c (diff)
Use more std::* for string handling
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index 01a8e471..7f3387c1 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -536,18 +536,17 @@ static BufferCompletion complete_opt(const BufferIterator& pos, OptionManager& o
boost::smatch match;
if (boost::regex_match(desc.begin(), desc.end(), match, re))
{
- BufferCoord coord{ str_to_int({match[1].first, match[1].second}) - 1,
- str_to_int({match[2].first, match[2].second}) - 1 };
+ BufferCoord coord{ stoi(match[1].str()) - 1, stoi(match[2].str()) - 1 };
if (not pos.buffer().is_valid(coord))
return {};
BufferIterator beg{pos.buffer(), coord};
BufferIterator end = beg;
if (match[3].matched)
{
- ByteCount len = str_to_int({match[3].first, match[3].second});
+ ByteCount len = stoi(match[3].str());
end = beg + len;
}
- size_t timestamp = (size_t)str_to_int(String(match[4].first, match[4].second));
+ size_t timestamp = (size_t)stoi(match[4].str());
size_t longest_completion = 0;
for (auto it = opt.begin() + 1; it != opt.end(); ++it)