Fixed restrict errors in bitbuf when compling on clang.
authorNicholas Hastings <nshastings@gmail.com>
Sun Oct 13 10:25:08 2013 -0400 (2013-10-13)
changeset 23241aa7f55407
parent 22 c48f88e77e01
child 24 e645c80b3e52
Fixed restrict errors in bitbuf when compling on clang.
public/tier1/bitbuf.h
tier1/bitbuf.cpp
     1.1 --- a/public/tier1/bitbuf.h	Sun Oct 06 13:46:15 2013 -0400
     1.2 +++ b/public/tier1/bitbuf.h	Sun Oct 13 10:25:08 2013 -0400
     1.3 @@ -181,7 +181,7 @@
     1.4  	void			WriteOneBitAt( int iBit, int nValue );
     1.5  	
     1.6  	// Write signed or unsigned. Range is only checked in debug.
     1.7 -	void			WriteUBitLong( unsigned int data, int numbits, bool bCheckRange=true );
     1.8 +	void			WriteUBitLong( unsigned int data, int numbits, bool bCheckRange=true ) RESTRICT;
     1.9  	void			WriteSBitLong( int data, int numbits );
    1.10  	
    1.11  	// Tell it whether or not the data is unsigned. If it's signed,
    1.12 @@ -241,7 +241,7 @@
    1.13  	int				GetNumBytesWritten() const;
    1.14  	int				GetNumBitsWritten() const;
    1.15  	int				GetMaxNumBits();
    1.16 -	int				GetNumBitsLeft();
    1.17 +	int				GetNumBitsLeft() RESTRICT;
    1.18  	int				GetNumBytesLeft();
    1.19  	unsigned char*	GetData();
    1.20  	const unsigned char*	GetData() const;
    1.21 @@ -250,7 +250,7 @@
    1.22  	bool			CheckForOverflow(int nBits);
    1.23  	inline bool		IsOverflowed() const {return m_bOverflow;}
    1.24  
    1.25 -	void			SetOverflowFlag();
    1.26 +	void			SetOverflowFlag() RESTRICT;
    1.27  
    1.28  
    1.29  public:
    1.30 @@ -292,7 +292,7 @@
    1.31  	return m_nDataBits;
    1.32  }
    1.33  
    1.34 -inline int bf_write::GetNumBitsLeft()	
    1.35 +inline int bf_write::GetNumBitsLeft() RESTRICT
    1.36  {
    1.37  	return m_nDataBits - m_iCurBit;
    1.38  }
    1.39 @@ -323,7 +323,7 @@
    1.40  	return m_bOverflow;
    1.41  }
    1.42  
    1.43 -BITBUF_INLINE void bf_write::SetOverflowFlag()
    1.44 +BITBUF_INLINE void bf_write::SetOverflowFlag() RESTRICT
    1.45  {
    1.46  #ifdef DBGFLAG_ASSERT
    1.47  	if ( m_bAssertOnOverflow )
    1.48 @@ -635,7 +635,7 @@
    1.49  public:
    1.50  	int				GetNumBytesLeft();
    1.51  	int				GetNumBytesRead();
    1.52 -	int				GetNumBitsLeft();
    1.53 +	int				GetNumBitsLeft() RESTRICT;
    1.54  	int				GetNumBitsRead() const;
    1.55  
    1.56  	// Has the buffer overflowed?
    1.57 @@ -645,7 +645,7 @@
    1.58  	inline bool		SeekRelative(int iBitDelta);	// Seek to an offset from the current position.
    1.59  
    1.60  	// Called when the buffer is overflowed.
    1.61 -	void			SetOverflowFlag();
    1.62 +	void			SetOverflowFlag() RESTRICT;
    1.63  
    1.64  
    1.65  public:
    1.66 @@ -678,7 +678,7 @@
    1.67  	return BitByte(m_iCurBit);
    1.68  }
    1.69  
    1.70 -inline int bf_read::GetNumBitsLeft()	
    1.71 +inline int bf_read::GetNumBitsLeft() RESTRICT
    1.72  {
    1.73  	return m_nDataBits - m_iCurBit;
    1.74  }
     2.1 --- a/tier1/bitbuf.cpp	Sun Oct 06 13:46:15 2013 -0400
     2.2 +++ b/tier1/bitbuf.cpp	Sun Oct 13 10:25:08 2013 -0400
     2.3 @@ -849,7 +849,7 @@
     2.4  	m_pDebugName = pName;
     2.5  }
     2.6  
     2.7 -void bf_read::SetOverflowFlag()
     2.8 +void bf_read::SetOverflowFlag() RESTRICT
     2.9  {
    2.10  	if ( m_bAssertOnOverflow )
    2.11  	{