Internals: Use and enforce class final for ~5% performance boost.

This commit is contained in:
Wilson Snyder
2020-11-18 21:32:16 -05:00
parent c0888c1b0f
commit b6ded59c2b
224 changed files with 976 additions and 949 deletions
+2 -2
View File
@@ -119,7 +119,7 @@ public:
return vertices;
}
class EdgeCmp {
class EdgeCmp final {
// Provides a deterministic compare for outgoing V3GraphEdge's
// to be used in Prim's algorithm below. Also used in the
// perfectMatching() routine.
@@ -494,7 +494,7 @@ void V3TSP::tspSort(const V3TSP::StateVec& states, V3TSP::StateVec* resultp) {
//######################################################################
// Self Tests
class TspTestState : public V3TSP::TspStateBase {
class TspTestState final : public V3TSP::TspStateBase {
public:
TspTestState(unsigned xpos, unsigned ypos)
: m_xpos{xpos}