You should make the method generic, the switch statement isn't needed.

Something like this should do:
```
var/obj/item/weapon/shard/Shard = object_pools[A][FIRST_OBJECT_INDEX]
object_pools[A] -= Shard
Shard.loc = B
. = Shard
//etc
```