summaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/Kernel/OVR_ContainerAllocator.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-21 23:01:12 +0100
committerSven Gothel <[email protected]>2015-03-21 23:01:12 +0100
commit0c5c4be020c2d55540058a49b2a879f46d5a1e13 (patch)
tree00f84c2ca18cc233b826014094b9cad0769a3ea5 /LibOVR/Src/Kernel/OVR_ContainerAllocator.h
parentcbbd775b6c754927632c333ff01424a0d2048c7c (diff)
parente490c3c7f7bb5461cfa78a214827aa534fb43a3e (diff)
Merge branch 'vanilla_0.4.4' and resolve conflicts
TODO: Validate for removed patches due to relocation Resolved Conflicts: LibOVR/Src/Kernel/OVR_ThreadsWinAPI.cpp LibOVR/Src/OVR_Linux_HMDDevice.cpp LibOVR/Src/OVR_OSX_HMDDevice.cpp LibOVR/Src/OVR_Profile.cpp LibOVR/Src/OVR_Sensor2Impl.cpp LibOVR/Src/OVR_SensorFusion.cpp LibOVR/Src/OVR_SensorImpl.cpp LibOVR/Src/OVR_Win32_DeviceStatus.cpp LibOVR/Src/OVR_Win32_HIDDevice.cpp LibOVR/Src/OVR_Win32_HIDDevice.h LibOVR/Src/OVR_Win32_HMDDevice.cpp
Diffstat (limited to 'LibOVR/Src/Kernel/OVR_ContainerAllocator.h')
-rw-r--r--LibOVR/Src/Kernel/OVR_ContainerAllocator.h84
1 files changed, 42 insertions, 42 deletions
diff --git a/LibOVR/Src/Kernel/OVR_ContainerAllocator.h b/LibOVR/Src/Kernel/OVR_ContainerAllocator.h
index afc0e6a..46bea2e 100644
--- a/LibOVR/Src/Kernel/OVR_ContainerAllocator.h
+++ b/LibOVR/Src/Kernel/OVR_ContainerAllocator.h
@@ -1,21 +1,21 @@
/************************************************************************************
-PublicHeader: OVR.h
+PublicHeader: OVR_Kernel.h
Filename : OVR_ContainerAllocator.h
Content : Template allocators and constructors for containers.
Created : September 19, 2012
Notes :
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -45,8 +45,8 @@ namespace OVR {
class ContainerAllocatorBase
{
public:
- static void* Alloc(UPInt size) { return OVR_ALLOC(size); }
- static void* Realloc(void* p, UPInt newSize) { return OVR_REALLOC(p, newSize); }
+ static void* Alloc(size_t size) { return OVR_ALLOC(size); }
+ static void* Realloc(void* p, size_t newSize) { return OVR_REALLOC(p, newSize); }
static void Free(void *p) { OVR_FREE(p); }
};
@@ -73,29 +73,29 @@ public:
*(T*)p = source;
}
- static void ConstructArray(void*, UPInt) {}
+ static void ConstructArray(void*, size_t) {}
- static void ConstructArray(void* p, UPInt count, const T& source)
+ static void ConstructArray(void* p, size_t count, const T& source)
{
- UByte *pdata = (UByte*)p;
- for (UPInt i=0; i< count; ++i, pdata += sizeof(T))
+ uint8_t *pdata = (uint8_t*)p;
+ for (size_t i=0; i< count; ++i, pdata += sizeof(T))
*(T*)pdata = source;
}
- static void ConstructArray(void* p, UPInt count, const T* psource)
+ static void ConstructArray(void* p, size_t count, const T* psource)
{
memcpy(p, psource, sizeof(T) * count);
}
static void Destruct(T*) {}
- static void DestructArray(T*, UPInt) {}
+ static void DestructArray(T*, size_t) {}
- static void CopyArrayForward(T* dst, const T* src, UPInt count)
+ static void CopyArrayForward(T* dst, const T* src, size_t count)
{
memmove(dst, src, count * sizeof(T));
}
- static void CopyArrayBackward(T* dst, const T* src, UPInt count)
+ static void CopyArrayBackward(T* dst, const T* src, size_t count)
{
memmove(dst, src, count * sizeof(T));
}
@@ -129,24 +129,24 @@ public:
OVR::ConstructAlt<T,S>(p, source);
}
- static void ConstructArray(void* p, UPInt count)
+ static void ConstructArray(void* p, size_t count)
{
- UByte* pdata = (UByte*)p;
- for (UPInt i=0; i< count; ++i, pdata += sizeof(T))
+ uint8_t* pdata = (uint8_t*)p;
+ for (size_t i=0; i< count; ++i, pdata += sizeof(T))
Construct(pdata);
}
- static void ConstructArray(void* p, UPInt count, const T& source)
+ static void ConstructArray(void* p, size_t count, const T& source)
{
- UByte* pdata = (UByte*)p;
- for (UPInt i=0; i< count; ++i, pdata += sizeof(T))
+ uint8_t* pdata = (uint8_t*)p;
+ for (size_t i=0; i< count; ++i, pdata += sizeof(T))
Construct(pdata, source);
}
- static void ConstructArray(void* p, UPInt count, const T* psource)
+ static void ConstructArray(void* p, size_t count, const T* psource)
{
- UByte* pdata = (UByte*)p;
- for (UPInt i=0; i< count; ++i, pdata += sizeof(T))
+ uint8_t* pdata = (uint8_t*)p;
+ for (size_t i=0; i< count; ++i, pdata += sizeof(T))
Construct(pdata, *psource++);
}
@@ -156,19 +156,19 @@ public:
OVR_UNUSED(p); // Suppress silly MSVC warning
}
- static void DestructArray(T* p, UPInt count)
+ static void DestructArray(T* p, size_t count)
{
p += count - 1;
- for (UPInt i=0; i<count; ++i, --p)
+ for (size_t i=0; i<count; ++i, --p)
p->~T();
}
- static void CopyArrayForward(T* dst, const T* src, UPInt count)
+ static void CopyArrayForward(T* dst, const T* src, size_t count)
{
memmove(dst, src, count * sizeof(T));
}
- static void CopyArrayBackward(T* dst, const T* src, UPInt count)
+ static void CopyArrayBackward(T* dst, const T* src, size_t count)
{
memmove(dst, src, count * sizeof(T));
}
@@ -202,24 +202,24 @@ public:
OVR::ConstructAlt<T,S>(p, source);
}
- static void ConstructArray(void* p, UPInt count)
+ static void ConstructArray(void* p, size_t count)
{
- UByte* pdata = (UByte*)p;
- for (UPInt i=0; i< count; ++i, pdata += sizeof(T))
+ uint8_t* pdata = (uint8_t*)p;
+ for (size_t i=0; i< count; ++i, pdata += sizeof(T))
Construct(pdata);
}
- static void ConstructArray(void* p, UPInt count, const T& source)
+ static void ConstructArray(void* p, size_t count, const T& source)
{
- UByte* pdata = (UByte*)p;
- for (UPInt i=0; i< count; ++i, pdata += sizeof(T))
+ uint8_t* pdata = (uint8_t*)p;
+ for (size_t i=0; i< count; ++i, pdata += sizeof(T))
Construct(pdata, source);
}
- static void ConstructArray(void* p, UPInt count, const T* psource)
+ static void ConstructArray(void* p, size_t count, const T* psource)
{
- UByte* pdata = (UByte*)p;
- for (UPInt i=0; i< count; ++i, pdata += sizeof(T))
+ uint8_t* pdata = (uint8_t*)p;
+ for (size_t i=0; i< count; ++i, pdata += sizeof(T))
Construct(pdata, *psource++);
}
@@ -229,22 +229,22 @@ public:
OVR_UNUSED(p); // Suppress silly MSVC warning
}
- static void DestructArray(T* p, UPInt count)
+ static void DestructArray(T* p, size_t count)
{
p += count - 1;
- for (UPInt i=0; i<count; ++i, --p)
+ for (size_t i=0; i<count; ++i, --p)
p->~T();
}
- static void CopyArrayForward(T* dst, const T* src, UPInt count)
+ static void CopyArrayForward(T* dst, const T* src, size_t count)
{
- for(UPInt i = 0; i < count; ++i)
+ for(size_t i = 0; i < count; ++i)
dst[i] = src[i];
}
- static void CopyArrayBackward(T* dst, const T* src, UPInt count)
+ static void CopyArrayBackward(T* dst, const T* src, size_t count)
{
- for(UPInt i = count; i; --i)
+ for(size_t i = count; i; --i)
dst[i-1] = src[i-1];
}