pandatool: Make WindowsGuid class trivially copyable
Squelches compiler warning
This commit is contained in:
parent
a40e8f9fb0
commit
cbbd3edc39
|
|
@ -11,14 +11,6 @@
|
|||
* @date 2004-10-03
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE WindowsGuid::
|
||||
WindowsGuid() {
|
||||
memset(this, 0, sizeof(WindowsGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -42,22 +34,6 @@ WindowsGuid(unsigned long data1,
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE WindowsGuid::
|
||||
WindowsGuid(const WindowsGuid ©) {
|
||||
(*this) = copy;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
INLINE void WindowsGuid::
|
||||
operator = (const WindowsGuid ©) {
|
||||
memcpy(this, ©, sizeof(WindowsGuid));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -25,14 +25,12 @@
|
|||
*/
|
||||
class WindowsGuid {
|
||||
public:
|
||||
INLINE WindowsGuid();
|
||||
constexpr WindowsGuid() = default;
|
||||
INLINE WindowsGuid(unsigned long data1,
|
||||
unsigned short data2, unsigned short data3,
|
||||
unsigned char b1, unsigned char b2, unsigned char b3,
|
||||
unsigned char b4, unsigned char b5, unsigned char b6,
|
||||
unsigned char b7, unsigned char b8);
|
||||
INLINE WindowsGuid(const WindowsGuid ©);
|
||||
INLINE void operator = (const WindowsGuid ©);
|
||||
|
||||
INLINE bool operator == (const WindowsGuid &other) const;
|
||||
INLINE bool operator != (const WindowsGuid &other) const;
|
||||
|
|
@ -45,10 +43,10 @@ public:
|
|||
void output(std::ostream &out) const;
|
||||
|
||||
private:
|
||||
unsigned long _data1;
|
||||
unsigned short _data2;
|
||||
unsigned short _data3;
|
||||
unsigned char _b1, _b2, _b3, _b4, _b5, _b6, _b7, _b8;
|
||||
unsigned long _data1 = 0;
|
||||
unsigned short _data2 = 0;
|
||||
unsigned short _data3 = 0;
|
||||
unsigned char _b1 = 0, _b2 = 0, _b3 = 0, _b4 = 0, _b5 = 0, _b6 = 0, _b7 = 0, _b8 = 0;
|
||||
};
|
||||
|
||||
INLINE std::ostream &operator << (std::ostream &out, const WindowsGuid &guid);
|
||||
|
|
|
|||
Loading…
Reference in New Issue