#182 Code Refactoring in src/libbrep/PullbackCurve.cpp

Untested
open
Sean Morrison
None
5
2013-05-21
2013-05-19
Priyanka Kapoor
No

Its an attempt to refactor code of file src/libbrep/PullbackCurve.cpp

1 Attachments

Discussion

  • Curve_data() returns an int* which is always 0 but this return will be ignored anyway ???

     
  • I will be using void as return type if i am not including last line of this function, in which if is returning NULL. As NULL is getting treated as a pointer, I just gave it int* (pointer as return type). Function is made just to remove redundancy of code in pullback_curve() and pullback_seam_curve(). If setting the values can be done through a single function, why to set values differently in both functions?

     
  • Why does Curve_data() return something if
    - it returns always the same value: 0? (0 and NULL are the same; look at the last two lines of Curve_data())
    - the return value will never be evaluated? At all places where Curve_data() is called its return value is ignored.

     
  • Sorry, my mistake. Returning NULL was required for pullback_curve() function. There was no need to retun in common function Curve_data(). I updated my patch now.

     
    Attachments
  • OK, next: You have to follow the guidelines in HACKING, especially "Coding Style & Standards".