File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -104,11 +104,11 @@ namespace geode
104104 uuid &operator =( const uuid &other ) = default ;
105105 ~uuid () = default ;
106106
107- bool operator ==( const uuid &other ) const ;
107+ [[nodiscard]] bool operator ==( const uuid &other ) const ;
108108
109- bool operator !=( const uuid &other ) const ;
109+ [[nodiscard]] bool operator !=( const uuid &other ) const ;
110110
111- bool operator <( const uuid &other ) const ;
111+ [[nodiscard]] bool operator <( const uuid &other ) const ;
112112
113113 [[nodiscard]] std::string string () const ;
114114
Original file line number Diff line number Diff line change @@ -47,7 +47,16 @@ namespace geode
4747
4848 [[nodiscard]] bool operator !=( const MeshElement& other ) const
4949 {
50- return mesh_id != other.mesh_id || element_id != other.element_id ;
50+ return !operator ==( other );
51+ }
52+
53+ [[nodiscard]] bool operator <( const MeshElement& other ) const
54+ {
55+ if ( mesh_id != other.mesh_id )
56+ {
57+ return mesh_id < other.mesh_id ;
58+ }
59+ return element_id < other.element_id ;
5160 }
5261
5362 template < typename Archive >
You can’t perform that action at this time.
0 commit comments