Fix Clang compilation

This commit is contained in:
Wojtek Figat
2022-10-21 19:06:05 +02:00
parent 8b446edc06
commit 52b1b19b02
2 changed files with 6 additions and 4 deletions

View File

@@ -171,8 +171,10 @@ public:
template<typename T>
typename TEnableIf<TIsBaseOf<ScriptingObject, T>::Value>::Type Write(const T* data)
{
const Guid id = data ? data->GetID() : Guid::Empty;
WriteBytes(&id, sizeof(Guid));
uint32 id[4] = { 0 };
if (data)
Platform::MemoryCopy(id, &data->GetID(), sizeof(id));
WriteBytes(id, sizeof(id));
}
template<typename T, typename AllocationType = HeapAllocation>
@@ -183,7 +185,7 @@ public:
if (size > 0)
{
if (TIsPODType<T>::Value && !TIsPointer<T>::Value)
WriteBytes(data.Get(), size * sizeof(T));
WriteBytes(data.Get(), size * sizeof(T));
else
{
for (int32 i = 0; i < size; i++)