Skip to content

Abuse entt::internal::type_index::next() #1158

Answered by skypjack
BossFeratu asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, exactly. You can still check if a storage exists for a given id though. Not a big deal.
Out of curiosity, is there a particular reason for which you cannot use a plain integer that you ++ as needed?
If you register all known storage types from the beginning, the generator only need to check if the id is already in use in the registry and ++ again eventually until it finds the next free one.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@BossFeratu
Comment options

@skypjack
Comment options

@BossFeratu
Comment options

@skypjack
Comment options

Answer selected by BossFeratu
@BossFeratu
Comment options

@BossFeratu
Comment options

@skypjack
Comment options

@BossFeratu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
discussion it sounds interesting, let's discuss it
2 participants