Curve_Compare_start() and Curve_Compare_end() are calling two different functions PointAtStart() and PointAtEnd().
That's why I put part of duplicate code in Curve_compare()
Last edit: jasleen 2013-05-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's true, so Curve_Compare_start() and Curve_Compare_end() aren't identical. Remaining the questions:
- Is Curve_Compare_end() used somewhere or can you remove it?
- Why not "return Curve_compare(A, B);"? (The comment "we should have already done this... but just in case" is wrong. There is no return before.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Correct me if I' wrong but Curve_Compare_start() and Curve_Compare_end() always return 0.
Oops.. Yes, you're right, I just made the change and uploaded a new patch.
OK, now looking at the functions I asked myself (and now I'm asking you): What's the difference between Curve_Compare_start() and Curve_Compare_end()?
They are doing same, but I didn't change that because they are calling by different names.
So they are a perfect example for the duplicacy of code. Besides Curve_Compare_end() is unused, there are no references to this function.
BTW, why contains Curve_compare() only a part of the duplicated code? You could have put the whole functionality into this function.
Curve_Compare_start() and Curve_Compare_end() are calling two different functions PointAtStart() and PointAtEnd().
That's why I put part of duplicate code in Curve_compare()
Last edit: jasleen 2013-05-25
That's true, so Curve_Compare_start() and Curve_Compare_end() aren't identical. Remaining the questions:
- Is Curve_Compare_end() used somewhere or can you remove it?
- Why not "return Curve_compare(A, B);"? (The comment "we should have already done this... but just in case" is wrong. There is no return before.)