Skip to content
Commit d32d3b97 authored by Igor Kushnir's avatar Igor Kushnir Committed by Milian Wolff
Browse files

ItemRepositoryReferenceCounting: remove extra checks

For many years IndexedIdentifier and IndexedQualifiedIdentifier didn't
have m_index or index validity checks. These classes don't need the
checks (otherwise, there would be assertion failures in
ItemRepository::verifyIndex()). The checks were added to
ItemRepositoryReferenceCounting utility functions in a recent commit
"Port instantiation information type repository to external locking"
because IndexedInstantiationInformation needs them. I can see two
disadvantages of the redundant checks:
1. The knowledge that the index is never zero for *Identifier classes is
   lost.
2. Extra checks have performance cost.

This commit moves the checks into IndexedInstantiationInformation's
member functions, thereby freeing the *Identifier classes from them.
parent 834fb13b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment