Menu

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

Untested
open
None
5
2013-05-21
2013-05-19
No

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

1 Attachments

Discussion

  • Daniel Roßberg

    Daniel Roßberg - 2013-05-19

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

     
  • Priyanka Kapoor

    Priyanka Kapoor - 2013-05-19

    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?

     
  • Daniel Roßberg

    Daniel Roßberg - 2013-05-20

    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.

     
  • Priyanka Kapoor

    Priyanka Kapoor - 2013-05-20

    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.

     
  • Daniel Roßberg

    Daniel Roßberg - 2013-05-21

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

     

Log in to post a comment.