MCPcopy Create free account
hub / github.com/OpenBoardView/OpenBoardView / remove

Function remove

src/openboardview/Board.h:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60template <class T>
61inline void remove(T &element, std::vector<T> &v) {
62
63 auto it = std::find(v.begin(), v.end(), element);
64
65 if (it != v.end()) {
66 using std::swap;
67 swap(*it, v.back());
68 v.pop_back();
69 }
70}
71
72// Any element being on the board.
73struct BoardElement {

Callers 1

HandleInputMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected