mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Remove useless ref macro, since it conflicts with VS2010's libraries.
The compiler warnings will have to be cleaned up later (without the use of a silly macro)
This commit is contained in:
@ -85,7 +85,6 @@ 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);
|
||||
// Loopback addresses
|
||||
if ((addr & kNetClassALoopbackMask) == (kNetClassALoopbackAddr & kNetClassALoopbackMask))
|
||||
return 4;
|
||||
|
@ -77,7 +77,6 @@ unsigned CBaseArray::CalcAllocGrowth (unsigned newAlloc, unsigned oldAlloc, unsi
|
||||
|
||||
//===========================================================================
|
||||
void * CBaseArray::ReallocPtr (void * ptr, unsigned bytes) {
|
||||
ref(ptr);
|
||||
void * newPtr = nil;
|
||||
if (bytes) {
|
||||
newPtr = ALLOCFLAGS(bytes, ARR_MEMORY_FLAGS);
|
||||
|
@ -275,12 +275,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) { }
|
||||
inline static void Construct (T * dest, unsigned 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) { }
|
||||
inline static void Destruct (T * dest, unsigned count) { }
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
@ -362,14 +362,12 @@ void TArrayCopyObject<T>::CopyConstruct (T * dest, const T source[], unsigned co
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
void TArrayCopyObject<T>::Destruct (T * dest) {
|
||||
ref(dest);
|
||||
dest->~T();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
void TArrayCopyObject<T>::Destruct (T * dest, unsigned count) {
|
||||
ref(dest);
|
||||
for (unsigned loop = count; loop--; )
|
||||
dest[loop].~T();
|
||||
}
|
||||
|
@ -91,8 +91,6 @@ unsigned Base64Encode (
|
||||
ASSERT(dstChars >= Base64EncodeSize(srcChars));
|
||||
ASSERT(dstData);
|
||||
|
||||
ref(dstChars);
|
||||
|
||||
const char * dstBase = dstData;
|
||||
const byte * srcTerm = srcData + srcChars;
|
||||
for (;;) switch (srcTerm - srcData) {
|
||||
@ -136,7 +134,6 @@ unsigned Base64Decode (
|
||||
ASSERT(srcData);
|
||||
ASSERT(dstChars >= Base64DecodeSize(srcChars));
|
||||
ASSERT(dstData);
|
||||
ref(dstChars);
|
||||
|
||||
const byte * dstBase = dstData;
|
||||
const char * srcTerm = srcData + srcChars;
|
||||
|
@ -597,15 +597,10 @@ 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);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
bool CCmdParser::OnExtra (const wchar str[]) {
|
||||
ref(str);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ static void Rc4Codec (
|
||||
unsigned sourceBytes,
|
||||
const void * sourceData
|
||||
) {
|
||||
ref(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt
|
||||
// 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());
|
||||
}
|
||||
@ -155,7 +155,7 @@ static void Rc4Codec (
|
||||
unsigned bytes,
|
||||
void * data
|
||||
) {
|
||||
ref(encrypt); // RC4 uses the same algorithm to both encrypt and decrypt
|
||||
// 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);
|
||||
@ -165,7 +165,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
|
||||
// RC4 uses the same algorithm to both encrypt and decrypt
|
||||
dest->SetCount(sourceBytes);
|
||||
|
||||
byte * destDataPtr = (byte *)dest->Ptr();
|
||||
@ -365,8 +365,6 @@ void CryptKeyGenerate (
|
||||
break;
|
||||
|
||||
case kCryptRsa:
|
||||
ref(keyBits);
|
||||
ref(publicData);
|
||||
#if 0
|
||||
KeyRsa::KeyGen(
|
||||
keyBits,
|
||||
|
@ -74,8 +74,6 @@ inline void EndianConvert (
|
||||
word * array,
|
||||
unsigned count
|
||||
) {
|
||||
ref(array);
|
||||
ref(count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -84,8 +82,6 @@ inline void EndianConvert (
|
||||
dword * array,
|
||||
unsigned count
|
||||
) {
|
||||
ref(array);
|
||||
ref(count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -94,8 +90,6 @@ inline void EndianConvert (
|
||||
qword * array,
|
||||
unsigned count
|
||||
) {
|
||||
ref(array);
|
||||
ref(count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -105,9 +99,6 @@ inline void EndianConvert (
|
||||
unsigned elemCount,
|
||||
unsigned elemBytes
|
||||
) {
|
||||
ref(data);
|
||||
ref(elemCount);
|
||||
ref(elemBytes);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,6 @@ TBaseHashTable<T>::TBaseHashTable () {
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
TBaseHashTable<T>::TBaseHashTable (const TBaseHashTable<T> & source) {
|
||||
ref(source);
|
||||
#ifdef HS_DEBUGGING
|
||||
FATAL("No copy constructor");
|
||||
#endif
|
||||
@ -213,7 +212,6 @@ TBaseHashTable<T>::TBaseHashTable (const TBaseHashTable<T> & source) {
|
||||
//===========================================================================
|
||||
template<class T>
|
||||
TBaseHashTable<T> & TBaseHashTable<T>::operator= (const TBaseHashTable<T> & source) {
|
||||
ref(source);
|
||||
#ifdef HS_DEBUGGING
|
||||
FATAL("No assignment operator");
|
||||
#endif
|
||||
@ -329,7 +327,6 @@ 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);
|
||||
ASSERT(link.m_linkToFull.IsLinked());
|
||||
m_fullList.Link(linkedObject, linkType, existingObject);
|
||||
}
|
||||
|
@ -122,7 +122,6 @@ CBaseLink::CBaseLink () {
|
||||
|
||||
//===========================================================================
|
||||
CBaseLink::CBaseLink (const CBaseLink & source) {
|
||||
ref(source);
|
||||
#ifdef HS_DEBUGGING
|
||||
if (source.IsLinked())
|
||||
FATAL("No copy constructor");
|
||||
@ -137,7 +136,6 @@ CBaseLink::~CBaseLink () {
|
||||
|
||||
//===========================================================================
|
||||
CBaseLink & CBaseLink::operator= (const CBaseLink & source) {
|
||||
ref(source);
|
||||
#ifdef HS_DEBUGGING
|
||||
FATAL("No assignment operator");
|
||||
#endif
|
||||
@ -348,7 +346,6 @@ CBaseList::CBaseList () {
|
||||
//===========================================================================
|
||||
CBaseList::CBaseList (const CBaseList & source) {
|
||||
m_linkOffset = LINK_OFFSET_UNINIT;
|
||||
ref(source);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
@ -359,7 +356,6 @@ CBaseList::~CBaseList () {
|
||||
|
||||
//===========================================================================
|
||||
CBaseList & CBaseList::operator= (const CBaseList & source) {
|
||||
ref(source);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,6 @@ public:
|
||||
ASSERT(!zeroed);
|
||||
#endif
|
||||
long prev = AtomicAdd(&m_ref, 1);
|
||||
ref(tag);
|
||||
REFTRACE("Inc %p %s: %u", this, tag, prev+1);
|
||||
return prev+1;
|
||||
}
|
||||
@ -103,7 +102,6 @@ public:
|
||||
ASSERT(!zeroed);
|
||||
#endif
|
||||
long prev = AtomicAdd(&m_ref, n);
|
||||
ref(tag);
|
||||
REFTRACE("Inc %p %s: %u", this, tag, prev+n);
|
||||
return prev+n;
|
||||
}
|
||||
@ -133,7 +131,6 @@ public:
|
||||
#endif
|
||||
OnZeroRef();
|
||||
}
|
||||
ref(tag);
|
||||
REFTRACE("Dec %p %s: %u", this, tag, prev-1);
|
||||
return prev-1;
|
||||
}
|
||||
@ -145,8 +142,6 @@ public:
|
||||
#ifdef HS_DEBUGGING
|
||||
ASSERT(!zeroed);
|
||||
#endif
|
||||
ref(oldTag);
|
||||
ref(newTag);
|
||||
REFTRACE("Inc %p %s: (xfer)", this, newTag);
|
||||
REFTRACE("Dec %p %s: (xfer)", this, oldTag);
|
||||
}
|
||||
|
@ -76,8 +76,6 @@ void CBaseSpareList::Free (void * object, unsigned objectSize) {
|
||||
// initialize memory to a freaky value in debug mode
|
||||
#ifdef HS_DEBUGGING
|
||||
MemSet(object, (byte) ((unsigned) object >> 4), objectSize);
|
||||
#else
|
||||
ref(objectSize);
|
||||
#endif
|
||||
|
||||
// link memory block onto head of spare list
|
||||
@ -140,8 +138,6 @@ void CBaseSpareList::CleanUp (const char typeName[]) {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
ref(typeName);
|
||||
#endif
|
||||
|
||||
// walk chain of AllocNodes and free each of them
|
||||
|
@ -94,9 +94,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 { 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 { ASSERT(!rhs); return !GuidsAreEqual(*this, kNilGuid); }
|
||||
};
|
||||
#include <PopPack.h>
|
||||
|
||||
|
Reference in New Issue
Block a user