MCPcopy Create free account
hub / github.com/FastLED/FastLED / erase

Function erase

src/fl/stl/vector.h:255–266  ·  view source on GitHub ↗

Erase the element at the given iterator position

Source from the content-addressed store, hash-verified

253
254 // Erase the element at the given iterator position
255 iterator erase(iterator pos) FL_NOEXCEPT {
256 if (pos != end()) {
257 pos->~T();
258 // shift all elements to the left
259 for (iterator p = pos; p != end() - 1; ++p) {
260 new (p) T(fl::move(*(p + 1))); // Use move constructor
261 (p + 1)->~T();
262 }
263 --current_size;
264 }
265 return pos;
266 }
267
268 iterator erase(const T &value) FL_NOEXCEPT {
269 iterator it = find(value);

Callers 14

eraseMethod · 0.70
eraseMethod · 0.70
eraseMethod · 0.70
eraseMethod · 0.70
eraseMethod · 0.70
eraseMethod · 0.70
eraseMethod · 0.70
pop_backMethod · 0.70
pop_frontMethod · 0.70
removeMethod · 0.70
remove_ifMethod · 0.70

Calls 5

endFunction · 0.70
findFunction · 0.70
emptyFunction · 0.70
beginFunction · 0.70
eraseMethod · 0.45

Tested by

no test coverage detected