mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 03:09:13 +00:00
Take advantage of some custom formatter shortcuts
This commit is contained in:
@ -114,7 +114,12 @@ bool plLocation::IsVirtual() const
|
||||
// THIS SHOULD BE FOR DEBUGGING ONLY <hint hint>
|
||||
plString plLocation::StringIze() const // Format to displayable string
|
||||
{
|
||||
return plString::Format("S0x%xF0x%x", fSequenceNumber, int(fFlags));
|
||||
return plFormat("S0x{x}F0x{x}", fSequenceNumber, fFlags);
|
||||
}
|
||||
|
||||
PL_FORMAT_IMPL(const plLocation &)
|
||||
{
|
||||
return PL_FORMAT_FORWARD(format, value.StringIze());
|
||||
}
|
||||
|
||||
plLocation plLocation::MakeReserved(uint32_t number)
|
||||
@ -261,10 +266,15 @@ plUoid& plUoid::operator=(const plUoid& rhs)
|
||||
// THIS SHOULD BE FOR DEBUGGING ONLY <hint hint>
|
||||
plString plUoid::StringIze() const // Format to displayable string
|
||||
{
|
||||
return plString::Format("(0x%x:0x%x:%s:C:[%u,%u])",
|
||||
fLocation.GetSequenceNumber(),
|
||||
int(fLocation.GetFlags()),
|
||||
fObjectName.c_str(),
|
||||
GetClonePlayerID(),
|
||||
return plFormat("(0x{x}:0x{x}:{}:C:[{},{}])",
|
||||
fLocation.GetSequenceNumber(),
|
||||
fLocation.GetFlags(),
|
||||
fObjectName,
|
||||
GetClonePlayerID(),
|
||||
GetCloneID());
|
||||
}
|
||||
|
||||
PL_FORMAT_IMPL(const plUoid &)
|
||||
{
|
||||
return PL_FORMAT_FORWARD(format, value.StringIze());
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "HeadSpin.h"
|
||||
#include "plFixedKey.h"
|
||||
#include "plLoadMask.h"
|
||||
#include "plString.h"
|
||||
#include "plFormat.h"
|
||||
|
||||
class hsStream;
|
||||
|
||||
@ -144,6 +144,8 @@ public:
|
||||
static const plLocation kInvalidLoc;
|
||||
};
|
||||
|
||||
PL_FORMAT_TYPE(const plLocation &)
|
||||
|
||||
//// plUoid //////////////////////////////////////////////////////////////////
|
||||
|
||||
class plUoid
|
||||
@ -198,4 +200,6 @@ protected:
|
||||
plLoadMask fLoadMask;
|
||||
};
|
||||
|
||||
PL_FORMAT_TYPE(const plUoid &)
|
||||
|
||||
#endif // plUoid_h_inc
|
||||
|
@ -83,3 +83,8 @@ plString plUUID::AsString() const
|
||||
ToString(str);
|
||||
return str;
|
||||
}
|
||||
|
||||
PL_FORMAT_IMPL(const plUUID &)
|
||||
{
|
||||
return PL_FORMAT_FORWARD(format, value.AsString());
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#define pnUUID_h_inc
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "plString.h"
|
||||
#include "plFormat.h"
|
||||
|
||||
class hsStream;
|
||||
|
||||
@ -96,4 +96,6 @@ public:
|
||||
static plUUID Generate();
|
||||
};
|
||||
|
||||
PL_FORMAT_TYPE(const plUUID &)
|
||||
|
||||
#endif // pnUUID_h_inc
|
||||
|
Reference in New Issue
Block a user