forked from FreeCAD/FreeCAD
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gui: Rename ViewProviderDatum::getRoot() to ViewProviderDatum::getDat…
…umRoot() Before the change the compiler raised the warning: 'Gui::ViewProviderDatum::getRoot' hides overloaded virtual function [-Werror,-Woverloaded-virtual] In the base class the method getRoot() is declared as const while in ViewProviderDatum it's not and that's why it's considered as an overloaded method. However, this signature causes two problems: 1. In the client code it's not always clear which version of getRoot() should be called 2. It violates const-correctness So, trying to declare the method ViewProviderDatum::getRoot() as const it now overrides the method of the base class (and fixes the warning) but this doesn't lead to the expected result: See https://forum.freecad.org/viewtopic.php?p=796064#p796064 The other option is to rename the method. And this gives the expected result now.
- Loading branch information
Showing
4 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters