By the way, is there a documentation tool in use for the C++ code? I thought I might document some things as a way of learning about them.
Thanks, David
Index: flower/axis.cc =================================================================== RCS file: /cvsroot/lilypond/lilypond/flower/axis.cc,v retrieving revision 1.12 diff -u -r1.12 axis.cc --- flower/axis.cc 5 Feb 2004 14:55:16 -0000 1.12 +++ flower/axis.cc 26 Apr 2004 21:48:51 -0000 @@ -6,7 +6,6 @@ (c) 1997--2004 Han-Wen Nienhuys <[EMAIL PROTECTED]> */
-#include <assert.h> #include "axes.hh" #include "string.hh"
@@ -22,24 +21,3 @@ { return a == Y_AXIS ? X_AXIS : Y_AXIS; } - -/* - TODO inline these. - */ -Axis -post_incr (Axis &a) -{ - assert (a < NO_AXES); - Axis b= a; - a = Axis (int (a) + 1); - return b; -} - -Axis -incr (Axis &a) -{ - assert (a < NO_AXES); - a = Axis (int (a) + 1); - return a; -} - Index: flower/include/axes.hh =================================================================== RCS file: /cvsroot/lilypond/lilypond/flower/include/axes.hh,v retrieving revision 1.12 diff -u -r1.12 axes.hh --- flower/include/axes.hh 5 Feb 2004 14:55:17 -0000 1.12 +++ flower/include/axes.hh 26 Apr 2004 21:48:51 -0000 @@ -10,6 +10,8 @@ #ifndef AXES_HH #define AXES_HH
+#include <assert.h> + enum Axis { X_AXIS =0, Y_AXIS =1, @@ -26,10 +28,25 @@ the operator ++ for Axis. */ Axis other_axis (Axis); -Axis post_incr (Axis &); -Axis incr (Axis &); -//Axis operator++ (Axis); -
+static inline +Axis +post_incr (Axis &a) +{ + assert (a < NO_AXES); + Axis b= a; + a = Axis (int (a) + 1); + return b; +} + +static inline +Axis +incr (Axis &a) +{ + assert (a < NO_AXES); + a = Axis (int (a) + 1); + return a; +} +//Axis operator++ (Axis);
#endif // AXES_HH
-- David Brandon/[EMAIL PROTECTED] Ask your doctor if David Brandon is right for you.
_______________________________________________ lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel