charconvfw/numbergrouping/Src/StateMachine.cpp
branchRCL_3
changeset 11 6971d1c87c9a
parent 0 1fb32624e06b
equal deleted inserted replaced
5:e96e8a131979 11:6971d1c87c9a
    69 	AddStateTransistionL(CharIndex, aState, aNextState);
    69 	AddStateTransistionL(CharIndex, aState, aNextState);
    70 }
    70 }
    71 
    71 
    72 void CStateMachine::AddStateTransistionL(TInt aIndex, TInt aState, TInt aNextState)
    72 void CStateMachine::AddStateTransistionL(TInt aIndex, TInt aState, TInt aNextState)
    73 {
    73 {
    74 	if(aIndex > iMaxNumberChars || aState > iMaxNumberStates || aNextState > iMaxNumberStates)
    74     if(aIndex < 0 || aIndex > iMaxNumberChars || aState > iMaxNumberStates || aNextState > iMaxNumberStates)
    75 		User::Leave(KErrGeneral);
    75 		User::Leave(KErrGeneral);
    76 
    76 
    77 	iStateTable[static_cast<TInt>(aIndex)][static_cast<TInt>(aState)] = static_cast<TInt>(aNextState);
    77 	iStateTable[static_cast<TInt>(aIndex)][static_cast<TInt>(aState)] = static_cast<TInt>(aNextState);
    78 }
    78 }
    79 
    79