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

Make pnUtUuid compile on *nix.

This commit is contained in:
Darryl Pogue
2012-01-29 00:18:26 -08:00
parent 65b75f0667
commit 945e1ac37b
11 changed files with 26 additions and 32 deletions

View File

@ -57,6 +57,11 @@ plUUID::plUUID( const plUUID & other )
CopyFrom( &other );
}
plUUID::plUUID( const Uuid & uuid )
{
memcpy(fData, uuid.data, sizeof(fData));
}
void plUUID::Read( hsStream * s)
{
s->LogSubStreamPushDesc("plUUID");
@ -73,3 +78,9 @@ const char * plUUID::AsString() const {
ToStdString(str);
return str.c_str();
}
plUUID::operator Uuid () const {
Uuid uuid;
memcpy(uuid.data, fData, sizeof(uuid.data));
return uuid;
}

View File

@ -44,9 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "HeadSpin.h"
#include "hsStlUtils.h"
#ifdef HS_BUILD_FOR_WIN32
#include "pnUtils/pnUtUuid.h"
#endif
class hsStream;
@ -65,9 +63,7 @@ public:
plUUID();
plUUID( const char * s );
plUUID( const plUUID & other );
#ifdef HS_BUILD_FOR_WIN32
plUUID( const Uuid & uuid );
#endif
void Clear();
bool IsNull() const;
bool IsSet() const { return !IsNull(); }
@ -85,9 +81,7 @@ public:
bool operator==( const plUUID & other ) const { return IsEqualTo( &other ); }
bool operator!=( const plUUID & other ) const { return !IsEqualTo( &other ); }
int operator <( const plUUID & other ) const { return CompareTo( &other ); }
#ifdef HS_BUILD_FOR_WIN32
operator Uuid () const;
#endif
static plUUID Generate();
};

View File

@ -47,11 +47,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <rpc.h>
plUUID::plUUID( const Uuid & uuid )
{
memcpy(fData, uuid.data, sizeof(fData));
}
void plUUID::Clear()
{
UuidCreateNil( (GUID *)this );
@ -85,12 +80,6 @@ void plUUID::CopyFrom( const plUUID & v ) {
memcpy(fData, v.fData, sizeof(fData));
}
plUUID::operator Uuid () const {
Uuid uuid;
memcpy(uuid.data, fData, sizeof(uuid.data));
return uuid;
}
bool plUUID::FromString( const char * str )
{
Clear();