/// @pre uniqueIdLut has been initialized and is large enough! void linkInUniqueIdLut(Manifest &manifest) { DENG2_ASSERT(&manifest.scheme() == thisPublic); // sanity check. int uniqueId = manifest.uniqueId(); DENG_ASSERT(uniqueIdInLutRange(uniqueId)); uniqueIdLut[uniqueId - uniqueIdBase] = &manifest; }
/// @pre uniqueIdMap is large enough if initialized! void unlinkInUniqueIdLut(Manifest const &manifest) { DENG2_ASSERT(&manifest.scheme() == thisPublic); // sanity check. // If the lut is already considered 'dirty' do not unlink. if(!uniqueIdLutDirty) { int uniqueId = manifest.uniqueId(); DENG2_ASSERT(uniqueIdInLutRange(uniqueId)); uniqueIdLut[uniqueId - uniqueIdBase] = 0; } }