File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,15 +118,6 @@ size_t VertexInputStateDesc::sizeForVertexAttributeFormat(VertexAttributeFormat
118118 IGL_UNREACHABLE_RETURN (0 )
119119}
120120
121- bool VertexInputBinding::operator !=(const VertexInputBinding& other) const {
122- return !(*this == other);
123- }
124-
125- bool VertexInputBinding::operator ==(const VertexInputBinding& other) const {
126- return other.sampleRate == sampleRate && other.sampleFunction == sampleFunction &&
127- other.stride == stride;
128- }
129-
130121size_t std::hash<VertexInputBinding>::operator ()(const VertexInputBinding& key) const {
131122 size_t hash = 0 ;
132123 hash ^= std::hash<int >()(static_cast <int >(key.sampleRate ));
@@ -135,10 +126,6 @@ size_t std::hash<VertexInputBinding>::operator()(const VertexInputBinding& key)
135126 return hash;
136127}
137128
138- bool VertexAttribute::operator !=(const VertexAttribute& other) const {
139- return !(*this == other);
140- }
141-
142129size_t std::hash<VertexAttribute>::operator ()(const VertexAttribute& key) const {
143130 size_t hash = 0 ;
144131 hash ^= std::hash<std::string>()(key.name );
@@ -149,11 +136,6 @@ size_t std::hash<VertexAttribute>::operator()(const VertexAttribute& key) const
149136 return hash;
150137}
151138
152- bool VertexAttribute::operator ==(const VertexAttribute& other) const {
153- return other.name == name && other.location == location && other.bufferIndex == bufferIndex &&
154- other.format == format && other.offset == offset;
155- }
156-
157139bool VertexInputStateDesc::operator ==(const VertexInputStateDesc& other) const {
158140 if (other.numAttributes != numAttributes || other.numInputBindings != numInputBindings) {
159141 return false ;
Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ struct VertexAttribute {
107107 std::string name; // GLES Only
108108 int location = -1 ; // Metal only
109109
110- bool operator ==(const VertexAttribute& other) const ;
111- bool operator !=(const VertexAttribute& other) const ;
110+ bool operator ==(const VertexAttribute& other) const = default ;
111+ bool operator !=(const VertexAttribute& other) const = default ;
112112};
113113
114114/* *
@@ -119,8 +119,8 @@ struct VertexInputBinding {
119119 VertexSampleFunction sampleFunction = VertexSampleFunction::PerVertex;
120120 size_t sampleRate = 1 ;
121121
122- bool operator ==(const VertexInputBinding& other) const ;
123- bool operator !=(const VertexInputBinding& other) const ;
122+ bool operator ==(const VertexInputBinding& other) const = default ;
123+ bool operator !=(const VertexInputBinding& other) const = default ;
124124};
125125
126126/* *
You can’t perform that action at this time.
0 commit comments