blob: 517b018a79aceb9818af82dbf7ec70b340423b4f (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#ifndef CORE_LIB_COMMON_H
#define CORE_LIB_COMMON_H
#include <cstdint>
#ifdef __GNUC__
#define CORE_LIB_ALIGN_16(x) x __attribute__((aligned(16)))
#else
#define CORE_LIB_ALIGN_16(x) __declspec(align(16)) x
#endif
#define VARIADIC_TEMPLATE
namespace CoreLib
{
typedef int64_t Int64;
typedef unsigned short Word;
#ifdef _M_X64
typedef int64_t PtrInt;
#else
typedef int PtrInt;
#endif
namespace Basic
{
class Object
{
public:
virtual ~Object()
{}
};
template <typename T>
inline T&& _Move(T & obj)
{
return static_cast<T&&>(obj);
}
template <typename T>
inline void Swap(T & v0, T & v1)
{
T tmp = _Move(v0);
v0 = _Move(v1);
v1 = _Move(tmp);
}
}
}
#endif
|