- big maintenance update
@@ -63,19 +63,14 @@ | ||
63 | 63 | double weight; |
64 | 64 | rw::rwStaticString <char> platName; |
65 | 65 | |
66 | - inline bool operator < ( const weightedNode& right ) const | |
66 | + inline static eir::eCompResult compare_values( const weightedNode& left, const weightedNode& right ) | |
67 | 67 | { |
68 | - if ( this->weight > right.weight ) | |
68 | + if ( left.weight > right.weight ) | |
69 | 69 | { |
70 | - return true; | |
70 | + return eir::eCompResult::LEFT_LESS; | |
71 | 71 | } |
72 | 72 | |
73 | - if ( FixedStringCompare( this->platName.GetConstString(), this->platName.GetLength(), right.platName.GetConstString(), right.platName.GetLength(), true ) == eir::eCompResult::LEFT_GREATER ) | |
74 | - { | |
75 | - return true; | |
76 | - } | |
77 | - | |
78 | - return false; | |
73 | + return eir::flip_comp_result( FixedStringCompare( left.platName.GetConstString(), left.platName.GetLength(), right.platName.GetConstString(), right.platName.GetLength(), true ) ); | |
79 | 74 | } |
80 | 75 | }; |
81 | 76 |
@@ -96,7 +91,7 @@ | ||
96 | 91 | } |
97 | 92 | |
98 | 93 | // The result container. |
99 | - rw::rwStaticSet <weightedNode> nodeContainer; | |
94 | + rw::rwStaticSet <weightedNode, weightedNode> nodeContainer; | |
100 | 95 | |
101 | 96 | // Process all platforms and store their rating. |
102 | 97 | for ( size_t n = 0; n < platCount; n++ ) |