updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / par2cmdline / 11-Use-autogenerated-methods-in-letype.patch
blob62d26fd47a8c7520fd8b1a46e329deb2c84da7bc
1 --- a/letype.h
2 +++ b/letype.h
3 @@ -28,44 +28,15 @@ typedef u64 leu64;
5 #else
7 -class leu16
8 +struct leu16
10 -public:
11 - leu16(void);
13 - leu16(const leu16 &other);
14 - leu16& operator=(const leu16 &other);
16 - leu16(const u16 &other);
17 leu16& operator=(const u16 &other);
19 operator u16(void) const;
21 -protected:
22 u16 value;
25 -inline leu16::leu16(void)
29 -inline leu16::leu16(const leu16 &other)
30 -: value(other.value)
34 -inline leu16& leu16::operator =(const leu16 &other)
36 - value = other.value;
37 - return *this;
40 -inline leu16::leu16(const u16 &other)
42 - ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
43 - ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff);
46 inline leu16& leu16::operator=(const u16 &other)
48 ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
49 @@ -81,46 +52,15 @@ inline leu16::operator u16(void) const
53 -class leu32
54 +struct leu32
56 -public:
57 - leu32(void);
59 - leu32(const leu32 &other);
60 - leu32& operator=(const leu32 &other);
62 - leu32(const u32 &other);
63 leu32& operator=(const u32 &other);
65 operator u32(void) const;
67 -protected:
68 u32 value;
71 -inline leu32::leu32(void)
75 -inline leu32::leu32(const leu32 &other)
76 -: value(other.value)
80 -inline leu32& leu32::operator =(const leu32 &other)
82 - value = other.value;
83 - return *this;
86 -inline leu32::leu32(const u32 &other)
88 - ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
89 - ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff);
90 - ((unsigned char*)&value)[2] = (unsigned char)((other >> 16) & 0xff);
91 - ((unsigned char*)&value)[3] = (unsigned char)((other >> 24) & 0xff);
94 inline leu32& leu32::operator=(const u32 &other)
96 ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
97 @@ -140,50 +80,15 @@ inline leu32::operator u32(void) const
101 -class leu64
102 +struct leu64
104 -public:
105 - leu64(void);
107 - leu64(const leu64 &other);
108 - leu64& operator=(const leu64 &other);
110 - leu64(const u64 &other);
111 leu64& operator=(const u64 &other);
113 operator u64(void) const;
115 -protected:
116 u64 value;
119 -inline leu64::leu64(void)
123 -inline leu64::leu64(const leu64 &other)
124 -: value(other.value)
128 -inline leu64& leu64::operator =(const leu64 &other)
130 - value = other.value;
131 - return *this;
134 -inline leu64::leu64(const u64 &other)
136 - ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
137 - ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff);
138 - ((unsigned char*)&value)[2] = (unsigned char)((other >> 16) & 0xff);
139 - ((unsigned char*)&value)[3] = (unsigned char)((other >> 24) & 0xff);
140 - ((unsigned char*)&value)[4] = (unsigned char)((other >> 32) & 0xff);
141 - ((unsigned char*)&value)[5] = (unsigned char)((other >> 40) & 0xff);
142 - ((unsigned char*)&value)[6] = (unsigned char)((other >> 48) & 0xff);
143 - ((unsigned char*)&value)[7] = (unsigned char)((other >> 56) & 0xff);
146 inline leu64& leu64::operator=(const u64 &other)
148 ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);