]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/moment.cc
add \defaultchild to InnerStaffGroup.
[lilypond.git] / lily / moment.cc
index c892d5f459d4183dc579408b35530d64b2cdd8df..8b866922a891de15371d7f10b261ed7e2d8a2596 100644 (file)
@@ -91,38 +91,43 @@ Moment::compare (Moment const &a, Moment const &b)
 }
 
 void
-Moment::operator+= (Moment const &src)
+Moment::operator += (Moment const &src)
 {
   main_part_ += src.main_part_;
   grace_part_ += src.grace_part_;
 }
+
 void
-Moment::operator-= (Moment const &src)
+Moment::operator -= (Moment const &src)
 {
   main_part_ -= src.main_part_;
   grace_part_ -= src.grace_part_;
 }
 
-/*
-  only take the main part of SRC for multiplication.
-*/
+/* Only take the main part of SRC for multiplication.  */
 void
-Moment::operator*= (Moment const &src)
+Moment::operator *= (Moment const &src)
 {
   main_part_ *= src.main_part_;
   grace_part_ *= src.main_part_;
 }
 
-/*
-  only take the main part of SRC for multiplication.
-*/
+/* Only take the main part of SRC for division.  */
 void
-Moment::operator/= (Moment const &src)
+Moment::operator /= (Moment const &src)
 {
   main_part_ /= src.main_part_;
   grace_part_ /= src.main_part_;
 }
 
+/* Only take the main part of SRC for division.  */
+void
+Moment::operator %= (Moment const &src)
+{
+  main_part_ %= src.main_part_;
+  grace_part_ %= src.main_part_;
+}
+
 int
 Moment::den () const
 {
@@ -159,17 +164,17 @@ Moment::to_string () const
 }
 
 Moment
-Moment::operator- () const
+Moment::operator - () const
 {
   Moment m;
   m.grace_part_ = -grace_part_;
-  m. main_part_ = -main_part_;
+  m.main_part_ = -main_part_;
   return m;
 }
 
 #ifdef STREAM_SUPPORT
 std::ostream &
-operator<< (std::ostream &os, Moment const &m)
+operator << (std::ostream &os, Moment const &m)
 {
   os << m.to_string ();
   return os;