Fix multiple cursors crashes by sorting cursors by min range
This commit is contained in:
@@ -95,6 +95,13 @@ T Clamp(T value, T min, T max) {
|
||||
return value;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void Swap(T *a, T *b) {
|
||||
T temp = *a;
|
||||
*a = *b;
|
||||
*b = temp;
|
||||
}
|
||||
|
||||
inline bool IsPowerOf2(size_t x) {
|
||||
size_t result = (((x) & ((x)-1)) == 0);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user