Backend/Database/GList.cpp
// All add & insert functions go to this one
All add & insert functions go to this one
All add & insert functions go to this one
void GList::insertObject(unsigned int index, int newType, const void* newBlock,
						 int64_t newBlockSize)
{
	if ((newBlockSize > 0) && (newBlock != NULL))
	{
		if (index > items.size())
			index = items.size();
		GType newItem(newType, newBlock, newBlockSize);
		if (index == items.size())
			addGType(newItem);
		else 
			insertGType(index, newItem);
	}
}
void GList :: insertObject ( unsigned int index , int newType , const void * newBlock , int64_t newBlockSize ) { if ( ( newBlockSize > 0 ) && ( newBlock != NULL ) ) { if ( index > items . size ( ) ) index = items . size ( ) ; GType newItem ( newType , newBlock , newBlockSize ) ; if ( index == items . size ( ) ) addGType ( newItem ) ; else insertGType ( index , newItem ) ; } }
All add & insert functions go to this one
All add & insert functions go to this one
// Add the object if its valid // fix the index if need be // Add the bundle item // insert