Streamline upgrade ghost ID
- avoid virtual destructors if not required
- prefer front/back over *begin and *end
- multiply less
- add const
- avoid naked new and delete, prefer std::unique_ptr
- avoid repeated push_back on container, prefer constructing in one shot
- prefer switch over repeated if-else-if
Edited by Marco Cattaneo