MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / FindPrevious

Method FindPrevious

Source/BookmarkCollection.cpp:155–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155CBookmark *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
165bool CBookmarkCollection::SortByName(bool Desc)
166{

Callers 1

OnBookmarksPreviousMethod · 0.80

Calls 5

emptyMethod · 0.80
DistanceMethod · 0.80
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected