New -Woverloaded-virtual warning from GetDataSet()

Hi all,

This warning started on 2022-01-15 (Saturday):

VTK/Common/DataModel/vtkUniformGridAMR.h:97:19: warning: 'vtkUniformGridAMR::GetDataSet' hides overloaded virtual function [-Woverloaded-virtual]
  vtkUniformGrid* GetDataSet(unsigned int level, unsigned int idx);
VTK/Common/DataModel/vtkCompositeDataSet.h:96:26: note: hidden overloaded virtual function 'vtkCompositeDataSet::GetDataSet' declared here: different number of parameters (1 vs 2)
  virtual vtkDataObject* GetDataSet(unsigned int flatIndex);


But neither of those two files have been changed recently, so I don’t understand why we’re only seeing this now. Anyone touch anything related recently?

But both these methods are public, so a simple rename seems not a solution…



!8740 was merged on Friday. The change is from December, but it was only recently merged. I suspect that using Superclass::GetDataSet; is warranted.


I completed the change before Christmas, and I merged when I came back from vacation. That’s why there was a difference in merge time.

Would you prefer to have a different function name?

I agree with ben here, this is the right fix, in all class overriding one of the methods.