blob: b7476286aa28861071760da80d7139f9ddc4b4fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#include "Runtime/Serialize/SerializeUtility.h"
struct DateTime
{
// We are wasting memory and serialization
// in assetdatabase is wrong because of the alignment!
// We do this change in 1.5 because it will force a rebuild of all assets
UInt16 highSeconds;
UInt16 fraction;
UInt32 lowSeconds;
DECLARE_SERIALIZE_OPTIMIZE_TRANSFER (DateTime)
DateTime ();
friend bool operator < (const DateTime& d0, const DateTime& d1);
friend bool operator == (const DateTime& d0, const DateTime& d1);
friend bool operator != (const DateTime& d0, const DateTime& d1) { return !(d0 == d1); }
};
template<class TransferFunction>
void DateTime::Transfer (TransferFunction& transfer)
{
TRANSFER (highSeconds);
TRANSFER (fraction);
TRANSFER (lowSeconds);
}
void ByteSwapDateTime (DateTime& dateTime);
|