blob: e1676554cb369f4dc920041124f12b566078faff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#pragma once
#include <cstdint>
template<class T>
inline void SwapArray(T* p, const size_t len) {
for (size_t i = 0, j = len - 1; i < len / 2; ++i, --j) {
T tmp = p[i];
p[i] = p[j];
p[j] = tmp;
}
}
|