| 143 | } |
| 144 | |
| 145 | CBookmark *CBookmarkCollection::FindNext(unsigned Frame, unsigned Row) const |
| 146 | { |
| 147 | if (m_pBookmark.empty()) return nullptr; |
| 148 | CBookmark temp(Frame, Row); |
| 149 | return std::min_element(m_pBookmark.begin(), m_pBookmark.end(), |
| 150 | [&] (const std::unique_ptr<CBookmark> &a, const std::unique_ptr<CBookmark> &b) { |
| 151 | return static_cast<unsigned>(a->Distance(temp) - 1) < static_cast<unsigned>(b->Distance(temp) - 1); |
| 152 | })->get(); |
| 153 | } |
| 154 | |
| 155 | CBookmark *CBookmarkCollection::FindPrevious(unsigned Frame, unsigned Row) const |
| 156 | { |