MCPcopy Create free account
hub / github.com/baldurk/renderdoc / NextBookmark

Method NextBookmark

qrenderdoc/Windows/ShaderViewer.cpp:7154–7171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7152}
7153
7154void ShaderViewer::NextBookmark()
7155{
7156 ScintillaEdit *cur = currentScintilla();
7157 if(!cur)
7158 return;
7159
7160 auto itBookmarks = m_Bookmarks.find(cur);
7161 if(itBookmarks == m_Bookmarks.end() || itBookmarks->empty())
7162 return;
7163
7164 sptr_t curLine = cur->lineFromPosition(cur->currentPos());
7165 auto itNextBookmark = std::upper_bound(itBookmarks->begin(), itBookmarks->end(), curLine);
7166 if(itNextBookmark == itBookmarks->end())
7167 itNextBookmark = itBookmarks->begin();
7168
7169 if(*itNextBookmark != curLine)
7170 cur->gotoLine(*itNextBookmark);
7171}
7172
7173void ShaderViewer::PreviousBookmark()
7174{

Callers

nothing calls this directly

Calls 7

lineFromPositionMethod · 0.80
currentPosMethod · 0.80
gotoLineMethod · 0.80
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected