void ResourceManager::addResource(IResourcePtr _item) { if (!_item->getResourceName().empty()) mResources[_item->getResourceName()] = _item; if (!_item->getResourceID().empty()) mResourcesID[_item->getResourceID()] = _item; }
void ResourceManager::removeResource(IResourcePtr _item) { if (_item == nullptr) return; if (!_item->getResourceName().empty()) { MapResource::iterator item = mResources.find(_item->getResourceName()); if (item != mResources.end()) mResources.erase(item); } }