| 153 | } |
| 154 | |
| 155 | CBookmark *CBookmarkCollection::FindPrevious(unsigned Frame, unsigned Row) const |
| 156 | { |
| 157 | if (m_pBookmark.empty()) return nullptr; |
| 158 | CBookmark temp(Frame, Row); |
| 159 | return std::min_element(m_pBookmark.begin(), m_pBookmark.end(), |
| 160 | [&] (const std::unique_ptr<CBookmark> &a, const std::unique_ptr<CBookmark> &b) { |
| 161 | return static_cast<unsigned>(temp.Distance(*a) - 1) < static_cast<unsigned>(temp.Distance(*b) - 1); |
| 162 | })->get(); |
| 163 | } |
| 164 | |
| 165 | bool CBookmarkCollection::SortByName(bool Desc) |
| 166 | { |