by Roots » 26 Nov 2014, 02:57
Would be helpful if you mentioned the file and line number that you found this function in (src/modes/menu/menu.h, line 114).
You would not want to use the virtual method if, for some reason, if you had a container of pointers to the base class AbstractMenuState but you only wanted to invoke the method _DrawBottomMenu() that is implemented in the base class, not the inheriting classes. If it was virtual, and you called _DrawBottomMenu on a pointer to an AbstractMenuState object, then it would invoke the method for the subclass that overrides it, which may not be the desired behavior. I took a quick glance at the code, however, and didn't see any compelling reason for why this method (and some others in AbstractMenuState) are not virtual. It seems like it makes more sense for this method to be virtual. Maybe Bertram can explain, or maybe you just found a bug/potential bug.