@@ -28,44 +28,15 @@ typedef u64 leu64;
28
28
29
29
#else
30
30
31
- class leu16
31
+ struct leu16
32
32
{
33
- public:
34
- leu16 (void );
35
-
36
- leu16 (const leu16 &other);
37
- leu16& operator =(const leu16 &other);
38
-
39
- leu16 (const u16 &other);
40
33
leu16 & operator = (const u16 & other );
41
34
42
35
operator u16 (void ) const ;
43
36
44
- protected:
45
37
u16 value ;
46
38
};
47
39
48
- inline leu16::leu16 (void )
49
- {
50
- }
51
-
52
- inline leu16::leu16 (const leu16 &other)
53
- : value(other.value)
54
- {
55
- }
56
-
57
- inline leu16& leu16::operator =(const leu16 &other)
58
- {
59
- value = other.value ;
60
- return *this ;
61
- }
62
-
63
- inline leu16::leu16 (const u16 &other)
64
- {
65
- ((unsigned char *)&value)[0 ] = (unsigned char )((other >> 0 ) & 0xff );
66
- ((unsigned char *)&value)[1 ] = (unsigned char )((other >> 8 ) & 0xff );
67
- }
68
-
69
40
inline leu16 & leu16 ::operator = (const u16 & other )
70
41
{
71
42
((unsigned char * )& value )[0 ] = (unsigned char )((other >> 0 ) & 0xff );
@@ -81,46 +52,15 @@ inline leu16::operator u16(void) const
81
52
}
82
53
83
54
84
- class leu32
55
+ struct leu32
85
56
{
86
- public:
87
- leu32 (void );
88
-
89
- leu32 (const leu32 &other);
90
- leu32& operator =(const leu32 &other);
91
-
92
- leu32 (const u32 &other);
93
57
leu32 & operator = (const u32 & other );
94
58
95
59
operator u32 (void ) const ;
96
60
97
- protected:
98
61
u32 value ;
99
62
};
100
63
101
- inline leu32::leu32 (void )
102
- {
103
- }
104
-
105
- inline leu32::leu32 (const leu32 &other)
106
- : value(other.value)
107
- {
108
- }
109
-
110
- inline leu32& leu32::operator =(const leu32 &other)
111
- {
112
- value = other.value ;
113
- return *this ;
114
- }
115
-
116
- inline leu32::leu32 (const u32 &other)
117
- {
118
- ((unsigned char *)&value)[0 ] = (unsigned char )((other >> 0 ) & 0xff );
119
- ((unsigned char *)&value)[1 ] = (unsigned char )((other >> 8 ) & 0xff );
120
- ((unsigned char *)&value)[2 ] = (unsigned char )((other >> 16 ) & 0xff );
121
- ((unsigned char *)&value)[3 ] = (unsigned char )((other >> 24 ) & 0xff );
122
- }
123
-
124
64
inline leu32 & leu32 ::operator = (const u32 & other )
125
65
{
126
66
((unsigned char * )& value )[0 ] = (unsigned char )((other >> 0 ) & 0xff );
@@ -140,50 +80,15 @@ inline leu32::operator u32(void) const
140
80
}
141
81
142
82
143
- class leu64
83
+ struct leu64
144
84
{
145
- public:
146
- leu64 (void );
147
-
148
- leu64 (const leu64 &other);
149
- leu64& operator =(const leu64 &other);
150
-
151
- leu64 (const u64 &other);
152
85
leu64 & operator = (const u64 & other );
153
86
154
87
operator u64 (void ) const ;
155
88
156
- protected:
157
89
u64 value ;
158
90
};
159
91
160
- inline leu64::leu64 (void )
161
- {
162
- }
163
-
164
- inline leu64::leu64 (const leu64 &other)
165
- : value(other.value)
166
- {
167
- }
168
-
169
- inline leu64& leu64::operator =(const leu64 &other)
170
- {
171
- value = other.value ;
172
- return *this ;
173
- }
174
-
175
- inline leu64::leu64 (const u64 &other)
176
- {
177
- ((unsigned char *)&value)[0 ] = (unsigned char )((other >> 0 ) & 0xff );
178
- ((unsigned char *)&value)[1 ] = (unsigned char )((other >> 8 ) & 0xff );
179
- ((unsigned char *)&value)[2 ] = (unsigned char )((other >> 16 ) & 0xff );
180
- ((unsigned char *)&value)[3 ] = (unsigned char )((other >> 24 ) & 0xff );
181
- ((unsigned char *)&value)[4 ] = (unsigned char )((other >> 32 ) & 0xff );
182
- ((unsigned char *)&value)[5 ] = (unsigned char )((other >> 40 ) & 0xff );
183
- ((unsigned char *)&value)[6 ] = (unsigned char )((other >> 48 ) & 0xff );
184
- ((unsigned char *)&value)[7 ] = (unsigned char )((other >> 56 ) & 0xff );
185
- }
186
-
187
92
inline leu64 & leu64 ::operator = (const u64 & other )
188
93
{
189
94
((unsigned char * )& value )[0 ] = (unsigned char )((other >> 0 ) & 0xff );
0 commit comments