| 47 | } __attribute__((packed)) bige_uint16_t; |
| 48 | |
| 49 | typedef struct BigEndianUInt32 { |
| 50 | union{ |
| 51 | uint32_t value; |
| 52 | struct{ |
| 53 | union{ |
| 54 | uint16_t high; |
| 55 | struct { |
| 56 | uint8_t hhigh, hlow; |
| 57 | }; |
| 58 | }; |
| 59 | union{ |
| 60 | uint16_t low; |
| 61 | struct { |
| 62 | uint8_t lhigh, llow; |
| 63 | }; |
| 64 | }; |
| 65 | }; |
| 66 | }; |
| 67 | |
| 68 | BigEndianUInt32& operator=(const uint32_t newValue){ |
| 69 | value = EndianLittleToBig32(newValue); |
| 70 | return *this; |
| 71 | } |
| 72 | |
| 73 | operator uint32_t(){ |
| 74 | return EndianBigToLittle32(value); |
| 75 | } |
| 76 | } __attribute__((packed)) bige_uint32_t; |
nothing calls this directly
no test coverage detected