Copy-Paste
V524 It is odd that the body of ‘-‘ function is fully equivalent to the body of ‘+’ function. assimp%engine-headless%engine-legacy types.h 183
/** Component-wise addition */ aiColor3D operator+(const aiColor3D& c) const { return aiColor3D(r+c.r,g+c.g,b+c.b); } /** Component-wise subtraction */ aiColor3D operator-(const aiColor3D& c) const { return aiColor3D(r+c.r,g+c.g,b+c.b); }
Addition and subtraction functions are implemented in a suspiciously similar fashion. It must be that the programmer forgot to change the sign in the subtraction function.
Please click here to see more bugs from this project.