mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-20 12:19:10 +00:00
Update1 for MSVC10
Capitalize the ref macro in hsTypes.h due to a name collision.
This commit is contained in:
@ -101,7 +101,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// 127.0.0.0 - 127.0.0.255
|
||||
// (lowest)
|
||||
static int NetAddressNodeSortValueNetOrder (NetAddressNode addr) {
|
||||
ref(NetAddressNodeSortValueNetOrder);
|
||||
REF(NetAddressNodeSortValueNetOrder);
|
||||
// Loopback addresses
|
||||
if ((addr & kNetClassALoopbackMask) == (kNetClassALoopbackAddr & kNetClassALoopbackMask))
|
||||
return 4;
|
||||
|
@ -93,7 +93,7 @@ unsigned CBaseArray::CalcAllocGrowth (unsigned newAlloc, unsigned oldAlloc, unsi
|
||||
|
||||
//===========================================================================
|
||||
void * CBaseArray::ReallocPtr (void * ptr, unsigned bytes) {
|
||||
ref(ptr);
|
||||
REF(ptr);
|
||||
void * newPtr = nil;
|
||||
if (bytes) {
|
||||
newPtr = ALLOCFLAGS(bytes, ARR_MEMORY_FLAGS);
|
||||
|
@ -291,12 +291,12 @@ template<class T>
|
||||
class TArrayCopyBits {
|
||||
public:
|
||||
inline static void Assign (T * dest, const T source[], unsigned count);
|
||||
inline static void Construct (T * dest) { ref(dest); }
|
||||
inline static void Construct (T * dest, unsigned count) { ref(dest); ref(count); }
|
||||
inline static void Construct (T * dest) { REF(dest); }
|
||||
inline static void Construct (T * dest, unsigned count) { REF(dest); REF(count); }
|
||||
inline static void CopyConstruct (T * dest, const T & source);
|
||||
inline static void CopyConstruct (T * dest, const T source[], unsigned count);
|
||||
inline static void Destruct (T * dest) { ref(dest); }
|
||||
inline static void Destruct (T * dest, unsigned count) { ref(dest); ref(count); }
|
||||
inline static void Destruct (T * dest) { REF(dest); }
|
||||
inline static void Destruct (T * dest, unsigned count) { REF(dest); REF(count); }
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
@ -378,14 +378,14 @@ void TArrayCopyObject<T>::CopyConstruct (T * dest, const T source[], unsigned co
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
void TArrayCopyObject<T>::Destruct (T * dest) {
|
||||
ref(dest);
|
||||
REF(dest);
|
||||
dest->~T();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
void TArrayCopyObject<T>::Destruct (T * dest, unsigned count) {
|
||||
ref(dest);
|
||||
REF(dest);
|
||||
for (unsigned loop = count; loop--; )
|
||||
dest[loop].~T();
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ unsigned Base64Encode (
|
||||
ASSERT(dstChars >= Base64EncodeSize(srcChars));
|
||||
ASSERT(dstData);
|
||||
|
||||
ref(dstChars);
|
||||
REF(dstChars);
|
||||
|
||||
const char * dstBase = dstData;
|
||||
const byte * srcTerm = srcData + srcChars;
|
||||
@ -152,7 +152,7 @@ unsigned Base64Decode (
|
||||
ASSERT(srcData);
|
||||
ASSERT(dstChars >= Base64DecodeSize(srcChars));
|
||||
ASSERT(dstData);
|
||||
ref(dstChars);
|
||||
REF(dstChars);
|
||||
|
||||
const byte * dstBase = dstData;
|
||||
const char * srcTerm = srcData + srcChars;
|
||||
|
@ -613,15 +613,15 @@ bool CCmdParser::IsSpecified (const wchar name[]) const {
|
||||
|
||||
//===========================================================================
|
||||
void CCmdParser::OnError (const wchar str[], ECmdError errorCode, const wchar arg[], const wchar value[]) {
|
||||
ref(str);
|
||||
ref(errorCode);
|
||||
ref(arg);
|
||||
ref(value);
|
||||
REF(str);
|
||||
REF(errorCode);
|
||||
REF(arg);
|
||||
REF(value);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
bool CCmdParser::OnExtra (const wchar str[]) {
|
||||
ref(str);
|
||||
REF(str);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ static void Rc4Codec (
|
||||
unsigned sourceBytes,
|
||||
const void * sourceData
|
||||
) {
|
||||
ref(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt
|
||||
REF(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt
|
||||
dest->SetCount(sourceBytes);
|
||||
RC4((RC4_KEY *)key->handle, sourceBytes, (const unsigned char *)sourceData, dest->Ptr());
|
||||
}
|
||||
@ -171,7 +171,7 @@ static void Rc4Codec (
|
||||
unsigned bytes,
|
||||
void * data
|
||||
) {
|
||||
ref(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt
|
||||
REF(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt
|
||||
byte * temp = ALLOCA(byte, bytes);
|
||||
RC4((RC4_KEY *)key->handle, bytes, (const unsigned char *)data, temp);
|
||||
MemCopy(data, temp, bytes);
|
||||
@ -181,7 +181,7 @@ static void Rc4Codec (
|
||||
|
||||
//===========================================================================
|
||||
void KeyRc4::Codec (bool encrypt, ARRAY(byte) * dest, unsigned sourceBytes, const void * sourceData) {
|
||||
ref(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt
|
||||
REF(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt
|
||||
dest->SetCount(sourceBytes);
|
||||
|
||||
byte * destDataPtr = (byte *)dest->Ptr();
|
||||
@ -381,8 +381,8 @@ void CryptKeyGenerate (
|
||||
break;
|
||||
|
||||
case kCryptRsa:
|
||||
ref(keyBits);
|
||||
ref(publicData);
|
||||
REF(keyBits);
|
||||
REF(publicData);
|
||||
#if 0
|
||||
KeyRsa::KeyGen(
|
||||
keyBits,
|
||||
|
@ -90,8 +90,8 @@ inline void EndianConvert (
|
||||
word * array,
|
||||
unsigned count
|
||||
) {
|
||||
ref(array);
|
||||
ref(count);
|
||||
REF(array);
|
||||
REF(count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -100,8 +100,8 @@ inline void EndianConvert (
|
||||
dword * array,
|
||||
unsigned count
|
||||
) {
|
||||
ref(array);
|
||||
ref(count);
|
||||
REF(array);
|
||||
REF(count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -110,8 +110,8 @@ inline void EndianConvert (
|
||||
qword * array,
|
||||
unsigned count
|
||||
) {
|
||||
ref(array);
|
||||
ref(count);
|
||||
REF(array);
|
||||
REF(count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -121,9 +121,9 @@ inline void EndianConvert (
|
||||
unsigned elemCount,
|
||||
unsigned elemBytes
|
||||
) {
|
||||
ref(data);
|
||||
ref(elemCount);
|
||||
ref(elemBytes);
|
||||
REF(data);
|
||||
REF(elemCount);
|
||||
REF(elemBytes);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ TBaseHashTable<T>::TBaseHashTable () {
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
TBaseHashTable<T>::TBaseHashTable (const TBaseHashTable<T> & source) {
|
||||
ref(source);
|
||||
REF(source);
|
||||
#ifdef HS_DEBUGGING
|
||||
FATAL("No copy constructor");
|
||||
#endif
|
||||
@ -229,7 +229,7 @@ TBaseHashTable<T>::TBaseHashTable (const TBaseHashTable<T> & source) {
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
TBaseHashTable<T> & TBaseHashTable<T>::operator= (const TBaseHashTable<T> & source) {
|
||||
ref(source);
|
||||
REF(source);
|
||||
#ifdef HS_DEBUGGING
|
||||
FATAL("No assignment operator");
|
||||
#endif
|
||||
@ -345,7 +345,7 @@ const T * TBaseHashTable<T>::Next (const T * object) const {
|
||||
template<class T>
|
||||
void TBaseHashTable<T>::Order (T * linkedObject, ELinkType linkType, T * existingObject) {
|
||||
THashLink<T> & link = GetLink(linkedObject);
|
||||
ref(link);
|
||||
REF(link);
|
||||
ASSERT(link.m_linkToFull.IsLinked());
|
||||
m_fullList.Link(linkedObject, linkType, existingObject);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ CBaseLink::CBaseLink () {
|
||||
|
||||
//===========================================================================
|
||||
CBaseLink::CBaseLink (const CBaseLink & source) {
|
||||
ref(source);
|
||||
REF(source);
|
||||
#ifdef HS_DEBUGGING
|
||||
if (source.IsLinked())
|
||||
FATAL("No copy constructor");
|
||||
@ -153,7 +153,7 @@ CBaseLink::~CBaseLink () {
|
||||
|
||||
//===========================================================================
|
||||
CBaseLink & CBaseLink::operator= (const CBaseLink & source) {
|
||||
ref(source);
|
||||
REF(source);
|
||||
#ifdef HS_DEBUGGING
|
||||
FATAL("No assignment operator");
|
||||
#endif
|
||||
@ -364,7 +364,7 @@ CBaseList::CBaseList () {
|
||||
//===========================================================================
|
||||
CBaseList::CBaseList (const CBaseList & source) {
|
||||
m_linkOffset = LINK_OFFSET_UNINIT;
|
||||
ref(source);
|
||||
REF(source);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
@ -375,7 +375,7 @@ CBaseList::~CBaseList () {
|
||||
|
||||
//===========================================================================
|
||||
CBaseList & CBaseList::operator= (const CBaseList & source) {
|
||||
ref(source);
|
||||
REF(source);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ public:
|
||||
ASSERT(!zeroed);
|
||||
#endif
|
||||
long prev = AtomicAdd(&m_ref, 1);
|
||||
ref(tag);
|
||||
REF(tag);
|
||||
REFTRACE("Inc %p %s: %u", this, tag, prev+1);
|
||||
return prev+1;
|
||||
}
|
||||
@ -119,7 +119,7 @@ public:
|
||||
ASSERT(!zeroed);
|
||||
#endif
|
||||
long prev = AtomicAdd(&m_ref, n);
|
||||
ref(tag);
|
||||
REF(tag);
|
||||
REFTRACE("Inc %p %s: %u", this, tag, prev+n);
|
||||
return prev+n;
|
||||
}
|
||||
@ -149,7 +149,7 @@ public:
|
||||
#endif
|
||||
OnZeroRef();
|
||||
}
|
||||
ref(tag);
|
||||
REF(tag);
|
||||
REFTRACE("Dec %p %s: %u", this, tag, prev-1);
|
||||
return prev-1;
|
||||
}
|
||||
@ -161,8 +161,8 @@ public:
|
||||
#ifdef HS_DEBUGGING
|
||||
ASSERT(!zeroed);
|
||||
#endif
|
||||
ref(oldTag);
|
||||
ref(newTag);
|
||||
REF(oldTag);
|
||||
REF(newTag);
|
||||
REFTRACE("Inc %p %s: (xfer)", this, newTag);
|
||||
REFTRACE("Dec %p %s: (xfer)", this, oldTag);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ void CBaseSpareList::Free (void * object, unsigned objectSize) {
|
||||
#ifdef HS_DEBUGGING
|
||||
MemSet(object, (byte) ((unsigned) object >> 4), objectSize);
|
||||
#else
|
||||
ref(objectSize);
|
||||
REF(objectSize);
|
||||
#endif
|
||||
|
||||
// link memory block onto head of spare list
|
||||
@ -157,7 +157,7 @@ void CBaseSpareList::CleanUp (const char typeName[]) {
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
ref(typeName);
|
||||
REF(typeName);
|
||||
#endif
|
||||
|
||||
// walk chain of AllocNodes and free each of them
|
||||
|
@ -110,9 +110,9 @@ struct Uuid {
|
||||
inline bool operator ! () const { return GuidIsNil(*this); }
|
||||
inline bool operator < (const Uuid & rhs) const { return GuidCompare(*this, rhs) < 0; }
|
||||
inline bool operator == (const Uuid & rhs) const { return GuidsAreEqual(*this, rhs); }
|
||||
inline bool operator == (int rhs) const { ref(rhs); ASSERT(!rhs); return GuidsAreEqual(*this, kNilGuid); }
|
||||
inline bool operator == (int rhs) const { REF(rhs); ASSERT(!rhs); return GuidsAreEqual(*this, kNilGuid); }
|
||||
inline bool operator != (const Uuid & rhs) const { return !GuidsAreEqual(*this, rhs); }
|
||||
inline bool operator != (int rhs) const { ref(rhs); ASSERT(!rhs); return !GuidsAreEqual(*this, kNilGuid); }
|
||||
inline bool operator != (int rhs) const { REF(rhs); ASSERT(!rhs); return !GuidsAreEqual(*this, kNilGuid); }
|
||||
};
|
||||
#include <PopPack.h>
|
||||
|
||||
|
Reference in New Issue
Block a user