diff --git a/src/ofbx.cpp b/src/ofbx.cpp index 4e06ecb..9f75a2e 100644 --- a/src/ofbx.cpp +++ b/src/ofbx.cpp @@ -4046,7 +4046,7 @@ bool Scene::finalize() { return true; } -IScene* load(const u8* data, u64 size, u16 flags, JobProcessor job_processor, void* job_user_ptr) +IScene* load(const u8* data, usize size, u16 flags, JobProcessor job_processor, void* job_user_ptr) { std::unique_ptr scene(new Scene()); scene->m_data.resize(size); diff --git a/src/ofbx.h b/src/ofbx.h index 94c0d6a..c9d87b0 100644 --- a/src/ofbx.h +++ b/src/ofbx.h @@ -21,6 +21,7 @@ static_assert(sizeof(u32) == 4, "u32 is not 4 bytes"); static_assert(sizeof(u64) == 8, "u64 is not 8 bytes"); static_assert(sizeof(i64) == 8, "i64 is not 8 bytes"); +typedef decltype(sizeof(0)) usize; using JobFunction = void (*)(void*); using JobProcessor = void (*)(JobFunction, void*, void*, u32, u32); @@ -756,7 +757,7 @@ struct IScene }; -IScene* load(const u8* data, u64 size, u16 flags, JobProcessor job_processor = nullptr, void* job_user_ptr = nullptr); +IScene* load(const u8* data, usize size, u16 flags, JobProcessor job_processor = nullptr, void* job_user_ptr = nullptr); const char* getError(); double fbxTimeToSeconds(i64 value); i64 secondsToFbxTime(double value);