That would only work if you changed lookups to be O(n), which kind of defeats the purpose. The reason swap even exists is because some enemies try to change the draw order of thiings, so it's actually pretty trivial. I just haven't looked at the exact behavior of this to confirm that children uids are always greater than the parent (which I would assume). If that's the case swap would simply be:

Code:
void sprite_list::swap(int a, int b)
{
    swap(sprites[a], sprites[b]);
    swap(sprites[a]->uid, sprites[b]->uid);
}