pandatool: Make WindowsGuid class trivially copyable

Squelches compiler warning
This commit is contained in:
rdb 2025-11-04 22:06:17 +01:00
parent a40e8f9fb0
commit cbbd3edc39
2 changed files with 5 additions and 31 deletions

View File

@ -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 &copy) {
(*this) = copy;
}
/**
*
*/
INLINE void WindowsGuid::
operator = (const WindowsGuid &copy) {
memcpy(this, &copy, sizeof(WindowsGuid));
}
/**
*
*/

View File

@ -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 &copy);
INLINE void operator = (const WindowsGuid &copy);
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);