From f56bb35301836e56582a575a75864392a0177875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 2 Dec 2013 19:31:46 -0800 Subject: Fix line endings. WHAMMY. --- mp/src/public/arraystack.h | 138 ++++++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'mp/src/public/arraystack.h') diff --git a/mp/src/public/arraystack.h b/mp/src/public/arraystack.h index 5f490e6d..907fb614 100644 --- a/mp/src/public/arraystack.h +++ b/mp/src/public/arraystack.h @@ -1,69 +1,69 @@ -//========= Copyright Valve Corporation, All rights reserved. ============// -// -// Purpose: -// -// $Workfile: $ -// $Date: $ -// -//----------------------------------------------------------------------------- -// $Log: $ -// -// $NoKeywords: $ -//=============================================================================// - -#ifndef ARRAYSTACK_H -#define ARRAYSTACK_H -#pragma once - -#include -#include "List.h" - -template class ArrayStack -{ -protected: - T *data; - int m_stackDepth; - int m_maxNumElements; - -public: - ArrayStack( int maxNumElements ) - { - data = new T[maxNumElements]; - m_maxNumElements = maxNumElements; - m_stackDepth = 0; - assert( data ); - } - - void Push( T elem ) - { - data[m_stackDepth++] = elem; - if( m_stackDepth > m_maxNumElements ) - { - printf( "ArrayStack overflow\n" ); - assert( 0 ); - } - } - - T Pop( void ) - { - if( m_stackDepth == 0 ) - { - printf( "ArrayStack underflow\n" ); - assert( 0 ); - } - return data[--m_stackDepth]; - } - - bool IsEmpty() - { - return ( m_stackDepth == 0 ); - } - - int GetDepth() - { - return m_stackDepth; - } -}; - - -#endif // ARRAYSTACK_H +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $Workfile: $ +// $Date: $ +// +//----------------------------------------------------------------------------- +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef ARRAYSTACK_H +#define ARRAYSTACK_H +#pragma once + +#include +#include "List.h" + +template class ArrayStack +{ +protected: + T *data; + int m_stackDepth; + int m_maxNumElements; + +public: + ArrayStack( int maxNumElements ) + { + data = new T[maxNumElements]; + m_maxNumElements = maxNumElements; + m_stackDepth = 0; + assert( data ); + } + + void Push( T elem ) + { + data[m_stackDepth++] = elem; + if( m_stackDepth > m_maxNumElements ) + { + printf( "ArrayStack overflow\n" ); + assert( 0 ); + } + } + + T Pop( void ) + { + if( m_stackDepth == 0 ) + { + printf( "ArrayStack underflow\n" ); + assert( 0 ); + } + return data[--m_stackDepth]; + } + + bool IsEmpty() + { + return ( m_stackDepth == 0 ); + } + + int GetDepth() + { + return m_stackDepth; + } +}; + + +#endif // ARRAYSTACK_H -- cgit v1.2.3