From 26f0fd4cc6577e52b08604d32469b221242bfb9c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 13 May 2013 14:23:07 +0200 Subject: Use more std::* for string handling --- src/input_handler.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/input_handler.cc') 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) -- cgit v1.2.3