Ticket #195: ContextModel.patch

File ContextModel.patch, 1.2 KB (added by Heiner Kirchhoffer, 14 years ago)
  • ContextModel.h

     
    4545
    4646#include "CommonDef.h"
    4747
    48 
     48#if UNINIT_CTX_CHECK
     49#include<assert.h>
     50#endif
    4951// ====================================================================================================================
    5052// Class definition
    5153// ====================================================================================================================
     
    5456class ContextModel
    5557{
    5658public:
     59#if UNINIT_CTX_CHECK
     60  ContextModel  ()                        { m_ucState = 126;           }
     61#else
    5762  ContextModel  ()                        { m_ucState = 0;             }
     63#endif
    5864  ~ContextModel ()                        {}
    5965 
     66#if UNINIT_CTX_CHECK
     67  UChar getState  ()                { assert( m_ucState != 126 ); return ( m_ucState >> 1 ); }                    ///< get current state
     68#else
    6069  UChar getState  ()                { return ( m_ucState >> 1 ); }                    ///< get current state
     70#endif
    6171  UChar getMps    ()                { return ( m_ucState  & 1 ); }                    ///< get curret MPS
    6272 
    6373  Void        init      ( Int   iQp,