26 static const std::size_t
highest_bit =
static_cast<std::size_t
>(1) << (
sizeof(std::size_t) * 8 - 1);
static id_manager & global_instance()
std::size_t get_save_id() const
Used for saving id to savegame.
id_manager(std::size_t next_id)
void clear()
Clears id counter after game.
static id_manager manager_
void set_save_id(std::size_t)
unit_id next_id()
returns id for unit that is created
friend bool operator>=(unit_id a, unit_id b)
static unit_id create_fake(std::size_t val)
static unit_id create_real(std::size_t val)
friend bool operator>(unit_id a, unit_id b)
friend bool operator<(unit_id a, unit_id b)
friend bool operator<=(unit_id a, unit_id b)
static const std::size_t highest_bit
friend bool operator==(unit_id a, unit_id b)