Files
tp/include/JSystem/JSupport/JSupport.h
T

14 lines
246 B
C++
Raw Normal View History

2022-01-12 19:14:44 +01:00
#ifndef JSUPPORT_H
#define JSUPPORT_H
template <typename T>
T* JSUConvertOffsetToPtr(const void* ptr, const void* offset) {
2022-10-04 17:29:53 -07:00
if (offset == NULL) {
2022-01-12 19:14:44 +01:00
return NULL;
} else {
2022-01-12 19:23:08 +01:00
return (T*)((s32)ptr + (s32)offset);
2022-01-12 19:14:44 +01:00
}
}
#endif