3 ms·
It's quite common actually. Usually in the context of something like "swap element 'n' with the last element in this vector" without any check to see if 'n' is
by AnthonyMouse 11y ago
It's quite common actually. Usually in the context of something like "swap element 'n' with the last element in this vector" without any check to see if 'n' is already the last element, because checking for that condition just to avoid a harmless no-op in the uncommon case is ugly and slower in the common case.