Clean out a bunch of compiler warnings.

This commit is contained in:
Ryan C. Gordon 2016-03-28 23:49:36 -04:00
parent bafa5fca05
commit a4000c69a8
4 changed files with 7 additions and 8 deletions

View File

@ -681,19 +681,19 @@ inline CEntity& CEntityPointer::operator*(void) const { return *ep_pen; }
/////////////////////////////////////////////////////////////////////
// Reference counting functions
inline void CEntity::AddReference(void) {
if (this!=NULL) {
//if (this!=NULL) {
ASSERT(en_ctReferences>=0);
en_ctReferences++;
}
//}
};
inline void CEntity::RemReference(void) {
if (this!=NULL) {
//if (this!=NULL) {
ASSERT(en_ctReferences>0);
en_ctReferences--;
if(en_ctReferences==0) {
delete this;
}
}
//}
};
/*

View File

@ -168,7 +168,7 @@ public:
GfxWrap tp_eWrapU, tp_eWrapV; // wrapping states
inline CTexParams(void) { Clear(); tp_bSingleMipmap = FALSE; };
inline void Clear(void) { tp_iFilter = 00; tp_iAnisotropy = 0; tp_eWrapU = tp_eWrapV = (GfxWrap)NONE; };
inline BOOL IsEqual( CTexParams tp) { return tp_iFilter==tp.tp_iFilter && tp_iAnisotropy==tp_iAnisotropy &&
inline BOOL IsEqual( CTexParams tp) { return tp_iFilter==tp.tp_iFilter && tp_iAnisotropy==tp.tp_iAnisotropy &&
tp_eWrapU==tp.tp_eWrapU && tp_eWrapV==tp.tp_eWrapV; };
};

View File

@ -67,7 +67,7 @@ template<class Type>
inline Type &CStaticStackArray<Type>::Push(void) {
sa_UsedCount++;
if (sa_UsedCount>CStaticArray<Type>::Count()) {
Expand(CStaticArray<Type>::Count()+sa_ctAllocationStep);
this->Expand(CStaticArray<Type>::Count()+sa_ctAllocationStep);
}
ASSERT(sa_UsedCount <= CStaticArray<Type>::Count());
return CStaticArray<Type>::operator[](sa_UsedCount-1);

View File

@ -588,14 +588,13 @@ procedures:
PlayCamera()
{
// eventually add to movers list
CCameraMarker &cm = (CCameraMarker&)*m_penTarget;
// if auto rotating
if( m_bAutoRotation)
{
jump PlayAutoRotatingCamera();
}
// if there is at least one marker
else if( &cm!=NULL)
else if( m_penTarget!=NULL)
{
// treat camera as movable
jump PlayMovingCamera();