need help understaning pointers to shared pointer


I came across this function that I'm having a hard time with

the syntax
std::vector<std::shared_ptr<GameObject>>* Worldmap is used on almost all
of the parameters in the game, so how is it used?




void GameObject::destroyPotion(std::vector<std::shared_ptr<GameObject>>* Worldmap){
std::shared_ptr<GameObject> del;
for (auto& obj : *Worldmap){
if (dynamic_cast<PotionPickUp*>(obj.get()))
del = obj;
}
Static::toDelete.push_back(del);
}
It is actually not a pointer to a shared_ptr. It is a pointer to a vector of shared_ptr.

so how is it used?
What do you mean by this? What's so unclear?

Here:

for (auto& obj : *Worldmap){

Worldmap is dereferenced in order to use it in a range based loop.
Topic archived. No new replies allowed.