-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include/geos/geomgraph: remove useless virtual qualifiers, add final …
…and improve a bit const safety (#1140) * Add -Wsuggest-override for gcc, and add missing override qualifiers * include/geos/geomgraph: remove useless virtual qualifiers, add final and improve a bit const safety The removal of the useless virtual qualifiers is safe since the addition of -Wsuggest-override in a previous commit makes sure that all overloaded methods (of methods that ware marked as 'virtual') are marked as 'override', which in turns ensures that all base methods that are overriden are marked as 'virtual'. (This doesn't change the status quo if a method was overloaded, but the base class lacked a 'virtual' and the overloaded method lacked a 'override'...) Said otherwise, the dangerous situation would be a class A { virtual void foo(); }; class B: public A { virtual void foo(); }; where we would erroneously remove the virtual qualifier. But given -Wsuggest-override, the above code would have been corrected to class A { virtual void foo(); }; class B: public A { virtual void foo() override; }; And thus if we erroneously remove the virtual qualifier from A::foo() the compiler will error out. This results in a small reduction in the size of libgeos.so (5954240 to 5946336), suggesting that de-virtualizations are done.
- Loading branch information
Showing
20 changed files
with
117 additions
and
114 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
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
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
Oops, something went wrong.