MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Slide

Function Slide

src/core/container_func.hpp:57–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 */
56template <typename TIter>
57auto Slide(TIter first, TIter last, TIter position) -> std::pair<TIter, TIter>
58{
59 if (last < position) return { std::rotate(first, last, position), position };
60 if (position < first) return { position, std::rotate(position, first, last) };
61 return { first, last };
62}
63
64#endif /* CONTAINER_FUNC_HPP */

Callers 3

OnDragDropMethod · 0.85
UseUnreservedIDMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected