Example #1
0
void pnVaultNode::IClearField(size_t which, size_t size)
{
    if (hasField(which))
        fCachedSize -= size;
    if (hasDirty(which))
        fDirtySize -= size;
    fFieldMask &= ~(1<<which);
    fDirtyMask &= ~(1<<which);
}
Example #2
0
void pnVaultNode::ISetField(size_t which, size_t size)
{
    if (!hasField(which))
        fCachedSize += size;
    if (!hasDirty(which))
        fDirtySize += size;
    fFieldMask |= (1ULL<<which);
    fDirtyMask |= (1ULL<<which);
}
Example #3
0
LocationProperty PropertyStorage::getLowestDirty(bool inIncludeLazy)
	{
	lassert(hasDirty(inIncludeLazy));
	
	std::map<std::pair<std::pair<bool, bool>, int32_t>, std::set<LocationProperty> >::const_iterator it;
	it = mNode_LazyCleanAndLevel.getValueToKeys().lower_bound(make_pair(make_pair(false, false), 0));
	
	if (!it->first.first.second)
		//it's dirty. MapWithIndex guarantees the std::set is not empty
		return *it->second.begin();
	
	//if we're here, we must be allowed to include lazy.
	//otherwise, there wouldn't be a dirty thing to return and we verified that at
	//the beginning of the function
	lassert(inIncludeLazy);
	it = mNode_LazyCleanAndLevel.getValueToKeys().lower_bound(make_pair(make_pair(true, false), 0));
	
	lassert(it != mNode_LazyCleanAndLevel.getValueToKeys().end());
	return *it->second.begin();
	}