Skip to content

Commit a9b5126

Browse files
committed
ReportDescriptor: simplify switch-case
1 parent e835922 commit a9b5126

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

HidSharp/Reports/ReportDescriptor.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,10 @@ void ParseEncodedItem(EncodedItem item)
170170
State.GlobalItemStateStack.RemoveAt(State.GlobalItemState.Count - 1);
171171
break;
172172

173+
case GlobalItemTag.ReportID:
174+
ReportsUseID = true;
175+
goto default;
173176
default:
174-
switch (item.TagForGlobal)
175-
{
176-
case GlobalItemTag.ReportID:
177-
ReportsUseID = true; break;
178-
}
179-
180177
State.GlobalItemState[item.TagForGlobal] = item;
181178
break;
182179
}

0 commit comments

Comments
 (0)