mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
refactor: simplify switch
This commit is contained in:
parent
0e285a5645
commit
3a7646bab7
@ -157,25 +157,18 @@ public void OnSerializeDelta(NetworkWriter writer)
|
||||
switch (change.operation)
|
||||
{
|
||||
case Operation.OP_ADD:
|
||||
case Operation.OP_REMOVE:
|
||||
SerializeItem(writer, change.item);
|
||||
break;
|
||||
|
||||
case Operation.OP_CLEAR:
|
||||
break;
|
||||
|
||||
case Operation.OP_INSERT:
|
||||
writer.WritePackedUInt32((uint)change.index);
|
||||
SerializeItem(writer, change.item);
|
||||
break;
|
||||
|
||||
case Operation.OP_REMOVE:
|
||||
SerializeItem(writer, change.item);
|
||||
break;
|
||||
|
||||
case Operation.OP_REMOVEAT:
|
||||
writer.WritePackedUInt32((uint)change.index);
|
||||
break;
|
||||
|
||||
case Operation.OP_INSERT:
|
||||
case Operation.OP_SET:
|
||||
case Operation.OP_DIRTY:
|
||||
writer.WritePackedUInt32((uint)change.index);
|
||||
|
Loading…
Reference in New Issue
Block a user