MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / InsertSorted

Function InsertSorted

Telegram/SourceFiles/data/data_stories.cpp:118–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118bool InsertSorted(std::vector<StoryId> &list, StoryId id) {
119 const auto i = ranges::lower_bound(list, id, std::greater<>());
120 if (i != end(list) && *i == id) {
121 return false;
122 }
123 list.insert(i, id);
124 return true;
125}
126
127bool RemoveSorted(std::vector<StoryId> &list, StoryId id) {
128 const auto i = ranges::lower_bound(list, id, std::greater<>());

Callers 4

parseAndApplyMethod · 0.85
savedStateChangedMethod · 0.85
albumIdsLoadMoreMethod · 0.85
toggleInProfileListMethod · 0.85

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected