File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -110,22 +110,26 @@ BOOL ShaderElement::equal(ShaderElement& S)
110110 return TRUE ;
111111}
112112
113- BOOL ShaderElement ::equal (ShaderElement * S)
113+ BOOL Shader ::equal (Shader * S, int index )
114114{
115- if (nullptr == S && nullptr == this )
115+ if (nullptr == E[index] && nullptr == S-> E [index] )
116116 return TRUE ;
117- if (nullptr == S || nullptr == this )
117+ if (nullptr == E[index] || nullptr == S-> E [index] )
118118 return FALSE ;
119- return equal (*S);
119+
120+ return (E[index] == S->E [index]);
120121}
121122
122- //
123- BOOL Shader::equal (Shader& S)
123+ BOOL Shader::equal (Shader* S)
124124{
125- return E[0 ]->equal (&*S.E [0 ]) && E[1 ]->equal (&*S.E [1 ]) && E[2 ]->equal (&*S.E [2 ]) && E[3 ]->equal (&*S.E [3 ]) &&
126- E[4 ]->equal (&*S.E [4 ]);
125+ for (int i = 0 ; i < 4 ; i++)
126+ {
127+ if (!equal (S, i))
128+ return FALSE ;
129+ }
130+ return TRUE ;
127131}
128- BOOL Shader::equal (Shader* S) { return equal (*S); }
132+
129133void STextureList::clear ()
130134{
131135 iterator it = begin ();
Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ struct ECORE_API Shader : public xr_resource_flagged
149149 ~Shader ();
150150 BOOL equal (Shader& S);
151151 BOOL equal (Shader* S);
152+ BOOL equal (Shader* S, int index);
152153};
153154
154155struct ECORE_API resptrcode_shader : public resptr_base<Shader>
You can’t perform that action at this time.
0 commit comments