remove one more allocation in hot path

This commit is contained in:
Roland Kuhn 2011-01-03 20:04:02 +01:00
parent 9dbfad331f
commit 5092eb0cf4

View file

@ -368,7 +368,7 @@ trait FSM[S, D] {
private def applyState(nextState: State) = {
currentState = nextState
val timeout = currentState.timeout orElse stateTimeouts(currentState.stateName)
val timeout = if (currentState.timeout.isDefined) currentState.timeout else stateTimeouts(currentState.stateName)
if (timeout.isDefined) {
val t = timeout.get
if (t.length >= 0) {