1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +00:00

Fix a cast error and check UUID size.

This commit is contained in:
2013-01-04 22:30:46 -08:00
committed by Darryl Pogue
parent f455ee25ec
commit 6681b1d596
4 changed files with 9 additions and 3 deletions

View File

@ -42,6 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pnUUID.h"
#include "hsStream.h"
static_assert(sizeof(plUUID) == sizeof(uint8_t[16]), "plUUID Must be the same size as a UUID");
const plUUID kNilUuid;
plUUID::plUUID()

View File

@ -45,6 +45,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <uuid/uuid.h>
// Check UUID size
static_assert(sizeof(plUUID) == sizeof(uuid_t), "plUUID and uuid_t types differ in size");
struct plUUIDHelper
{
static inline void CopyToPlasma( plUUID * dst, const uuid_t & src )

View File

@ -43,10 +43,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifdef HS_BUILD_FOR_WIN32
#include <rpc.h>
// Check UUID size
static_assert(sizeof(plUUID) == sizeof(GUID), "plUUID and Win32 GUID types differ in size");
void plUUID::Clear()
{
UuidCreateNil( (GUID *)this );