refactor: simplify switch

This commit is contained in:
Paul Pacheco 2019-04-06 07:16:36 -05:00
parent 0e285a5645
commit 3a7646bab7

View File

@ -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);