0

I am trying to fix analyzer errors, but I am stuck at this error, have no idea why I am getting this error here is my code.

struct Config{
  std::shared_ptr<std::set<int>> data;
  std::shared_ptr<std::set<int>> getData(){
     return data;
  }
}

void Engine::Notify()
{
    if(allowed)
    {
        for (auto item: *config.getData())
        {
            process->dispatch(item);
        }
    }

}

Error: Value stored to 'item' during its initialization is never read

foragerDev
  • 1,307
  • 1
  • 9
  • 22

0 Answers0