2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
717 B

  1. //
  2. // SCStateTransitionPayload.m
  3. // Snapchat
  4. //
  5. // Created by Lin Jia on 1/8/18.
  6. //
  7. #import "SCStateTransitionPayload.h"
  8. #import <SCFoundation/SCAssertWrapper.h>
  9. @implementation SCStateTransitionPayload
  10. - (instancetype)initWithFromState:(SCCaptureStateMachineStateId)fromState toState:(SCCaptureStateMachineStateId)toState
  11. {
  12. self = [super init];
  13. if (self) {
  14. SCAssert(fromState != toState, @"");
  15. SCAssert(fromState > SCCaptureBaseStateId && fromState < SCCaptureStateMachineStateIdCount, @"");
  16. SCAssert(toState > SCCaptureBaseStateId && toState < SCCaptureStateMachineStateIdCount, @"");
  17. _fromState = fromState;
  18. _toState = toState;
  19. }
  20. return self;
  21. }
  22. @end