summaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/Kernel/OVR_Alg.h
diff options
context:
space:
mode:
Diffstat (limited to 'LibOVR/Src/Kernel/OVR_Alg.h')
-rw-r--r--LibOVR/Src/Kernel/OVR_Alg.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/LibOVR/Src/Kernel/OVR_Alg.h b/LibOVR/Src/Kernel/OVR_Alg.h
index 783af21..e03cea0 100644
--- a/LibOVR/Src/Kernel/OVR_Alg.h
+++ b/LibOVR/Src/Kernel/OVR_Alg.h
@@ -446,10 +446,10 @@ typename Array::ValueType& Median(Array& arr)
UPInt mid = (count - 1) / 2;
OVR_ASSERT(count > 0);
- for (int j = 0; j <= mid; j++)
+ for (UPInt j = 0; j <= mid; j++)
{
- int min = j;
- for (int k = j + 1; k < count; k++)
+ UPInt min = j;
+ for (UPInt k = j + 1; k < count; k++)
if (arr[k] < arr[min])
min = k;
Swap(arr[j], arr[min]);
@@ -842,12 +842,12 @@ namespace ByteUtil {
inline UInt64 SwapOrder(UInt64 v)
{
return (v>>56) |
- ((v&UInt64(0x00FF000000000000))>>40) |
- ((v&UInt64(0x0000FF0000000000))>>24) |
- ((v&UInt64(0x000000FF00000000))>>8) |
- ((v&UInt64(0x00000000FF000000))<<8) |
- ((v&UInt64(0x0000000000FF0000))<<24) |
- ((v&UInt64(0x000000000000FF00))<<40) |
+ ((v&UInt64(0x00FF000000000000ULL))>>40) |
+ ((v&UInt64(0x0000FF0000000000ULL))>>24) |
+ ((v&UInt64(0x000000FF00000000ULL))>>8) |
+ ((v&UInt64(0x00000000FF000000ULL))<<8) |
+ ((v&UInt64(0x0000000000FF0000ULL))<<24) |
+ ((v&UInt64(0x000000000000FF00ULL))<<40) |
(v<<56);
}
inline SInt64 SwapOrder(SInt64 v) { return (SInt64)SwapOrder(UInt64(v)); }