Revisão | e8e14d478ece8c18e4eb438e1652b9307cc493fa (tree) |
---|---|
Hora | 2018-01-10 00:13:19 |
Autor | <exeal@user...> |
.
@@ -745,8 +745,8 @@ | ||
745 | 745 | firstLine.text_.replace(offsetInLine(beginning), erasedLength, temp); |
746 | 746 | } |
747 | 747 | } catch(...) { |
748 | - const ascension::detail::GapVector<Line*>::const_iterator b(std::begin(lines_) + kernel::line(end) + 1); | |
749 | - const ascension::detail::GapVector<Line*>::const_iterator e(b + allocatedLines.size()); | |
748 | + const auto b(std::next(std::begin(lines_), kernel::line(end) + 1)); | |
749 | + const auto e(std::next(b, allocatedLines.size())); | |
750 | 750 | std::for_each(b, e, std::default_delete<Line>()); |
751 | 751 | lines_.erase(b, e); |
752 | 752 | throw; |
@@ -763,7 +763,7 @@ | ||
763 | 763 | |
764 | 764 | // 5. remove lines to erase |
765 | 765 | if(!boost::empty(region)) { |
766 | - const auto b(std::begin(lines_) + kernel::line(beginning) + 1), e(std::begin(lines_) + kernel::line(end) + 1); | |
766 | + const auto b(std::next(std::begin(lines_), kernel::line(beginning) + 1)), e(std::next(std::begin(lines_), kernel::line(end) + 1)); | |
767 | 767 | std::for_each(b, e, std::default_delete<Line>()); |
768 | 768 | lines_.erase(b, e); |
769 | 769 | } |