Skip to content

Commit f323b65

Browse files
Fix more whitespace.
1 parent 0e622e4 commit f323b65

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

Packages/com.unity.inputsystem/InputSystem/Runtime/Actions/InputActionState.cs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ internal unsafe class InputActionState : IInputStateChangeMonitor, ICloneable, I
125125
private InputEventPtr m_CurrentlyProcessingThisEvent;
126126
private Action m_OnBeforeUpdateDelegate;
127127
private Action m_OnAfterUpdateDelegate;
128-
129128
private static readonly ProfilerMarker k_InputInitialActionStateCheckMarker = new ProfilerMarker("InitialActionStateCheck");
130129
private static readonly ProfilerMarker k_InputActionResolveConflictMarker = new ProfilerMarker("InputActionResolveConflict");
131130
private static readonly ProfilerMarker k_InputActionCallbackMarker = new ProfilerMarker("InputActionCallback");
@@ -650,8 +649,7 @@ private void RestoreActionStatesAfterReResolvingBindings(UnmanagedMemory oldStat
650649
var newControlIndex = FindControlIndexOnBinding(bindingIndex, control);
651650

652651
// This assert is used by test: Actions_ActiveBindingsHaveCorrectBindingIndicesAfterBindingResolution
653-
Debug.Assert(newControlIndex != kInvalidIndex,
654-
"Could not find active control after binding resolution");
652+
Debug.Assert(newControlIndex != kInvalidIndex, "Could not find active control after binding resolution");
655653
if (newControlIndex != kInvalidIndex)
656654
{
657655
newActionState.phase = oldActionState.phase;
@@ -663,7 +661,8 @@ private void RestoreActionStatesAfterReResolvingBindings(UnmanagedMemory oldStat
663661
}
664662

665663
// Also bring over interaction states.
666-
Debug.Assert(newBindingState.interactionCount == oldBindingState.interactionCount, "Interaction count on binding must not have changed when doing a control-only resolve");
664+
Debug.Assert(newBindingState.interactionCount == oldBindingState.interactionCount,
665+
"Interaction count on binding must not have changed when doing a control-only resolve");
667666
for (var n = 0; n < newBindingState.interactionCount; ++n)
668667
{
669668
ref var oldInteractionState = ref oldState.interactionStates[oldBindingState.interactionStartIndex + n];
@@ -835,7 +834,8 @@ private bool IsActionBoundToControlFromDevice(InputDevice device, int actionInde
835834
public void ResetActionState(int actionIndex, InputActionPhase toPhase = InputActionPhase.Waiting, bool hardReset = false)
836835
{
837836
Debug.Assert(actionIndex >= 0 && actionIndex < totalActionCount, "Action index out of range when resetting action");
838-
Debug.Assert(toPhase == InputActionPhase.Waiting || toPhase == InputActionPhase.Disabled, "Phase must be Waiting or Disabled");
837+
Debug.Assert(toPhase == InputActionPhase.Waiting || toPhase == InputActionPhase.Disabled,
838+
"Phase must be Waiting or Disabled");
839839

840840
// If the action in started or performed phase, cancel it first.
841841
var actionState = &actionStates[actionIndex];
@@ -867,7 +867,8 @@ public void ResetActionState(int actionIndex, InputActionPhase toPhase = InputAc
867867
// No interactions. Cancel the action directly.
868868

869869
Debug.Assert(actionState->bindingIndex != kInvalidIndex, "Binding index on trigger state is invalid");
870-
Debug.Assert(bindingStates[actionState->bindingIndex].interactionCount == 0, "Action has been triggered but apparently not from an interaction yet there's interactions on the binding that got triggered?!?");
870+
Debug.Assert(bindingStates[actionState->bindingIndex].interactionCount == 0,
871+
"Action has been triggered but apparently not from an interaction yet there's interactions on the binding that got triggered?!?");
871872

872873
if (actionState->phase != InputActionPhase.Canceled)
873874
ChangePhaseOfAction(InputActionPhase.Canceled, ref actionStates[actionIndex],
@@ -1303,8 +1304,7 @@ private void OnBeforeInitialUpdate()
13031304
if (!bindingState.initialStateCheckPending)
13041305
continue;
13051306

1306-
Debug.Assert(!bindingState.isPartOfComposite,
1307-
"Initial state check flag must be set on composite, not on its parts");
1307+
Debug.Assert(!bindingState.isPartOfComposite, "Initial state check flag must be set on composite, not on its parts");
13081308
bindingState.initialStateCheckPending = false;
13091309

13101310
var controlStartIndex = bindingState.controlStartIndex;
@@ -1346,7 +1346,6 @@ private void OnBeforeInitialUpdate()
13461346
}
13471347
}
13481348
}
1349-
13501349
manager.FireStateChangeNotifications();
13511350

13521351
k_InputInitialActionStateCheckMarker.End();
@@ -1380,16 +1379,14 @@ void IInputStateChangeMonitor.NotifyControlStateChanged(InputControl control, do
13801379
return;
13811380
#endif
13821381

1383-
SplitUpMapAndControlAndBindingIndex(mapControlAndBindingIndex, out var mapIndex, out var controlIndex,
1384-
out var bindingIndex);
1382+
SplitUpMapAndControlAndBindingIndex(mapControlAndBindingIndex, out var mapIndex, out var controlIndex, out var bindingIndex);
13851383
ProcessControlStateChange(mapIndex, controlIndex, bindingIndex, time, eventPtr);
13861384
}
13871385

13881386
void IInputStateChangeMonitor.NotifyTimerExpired(InputControl control, double time,
13891387
long mapControlAndBindingIndex, int interactionIndex)
13901388
{
1391-
SplitUpMapAndControlAndBindingIndex(mapControlAndBindingIndex, out var mapIndex, out var controlIndex,
1392-
out var bindingIndex);
1389+
SplitUpMapAndControlAndBindingIndex(mapControlAndBindingIndex, out var mapIndex, out var controlIndex, out var bindingIndex);
13931390
ProcessTimeout(time, mapIndex, controlIndex, bindingIndex, interactionIndex);
13941391
}
13951392

@@ -1564,7 +1561,8 @@ private void ProcessControlStateChange(int mapIndex, int controlIndex, int bindi
15641561
}
15651562

15661563
// Check if we should suppress interaction processing notifications
1567-
m_Suppressed = (eventPtr != null) && eventPtr.handled && InputSystem.manager.inputEventHandledPolicy == InputEventHandledPolicy.SuppressActionEventNotifications;
1564+
m_Suppressed = (eventPtr != null) && eventPtr.handled &&
1565+
InputSystem.manager.inputEventHandledPolicy == InputEventHandledPolicy.SuppressActionEventNotifications;
15681566

15691567
// Check if we have multiple concurrent actuations on the same action. This may lead us
15701568
// to ignore certain inputs (e.g. when we get an input of lesser magnitude while already having
@@ -2324,7 +2322,8 @@ internal void ChangePhaseOfInteraction(InputActionPhase newPhase, ref TriggerSta
23242322
for (var i = 0; i < numInteractions; ++i)
23252323
{
23262324
var index = interactionStartIndex + i;
2327-
if (index != trigger.interactionIndex && (interactionStates[index].phase == InputActionPhase.Started || interactionStates[index].phase == InputActionPhase.Performed))
2325+
if (index != trigger.interactionIndex && (interactionStates[index].phase == InputActionPhase.Started ||
2326+
interactionStates[index].phase == InputActionPhase.Performed))
23282327
{
23292328
// Trigger start.
23302329
var startTime = interactionStates[index].startTime;

0 commit comments

Comments
 (0)