Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2158)

Side by Side Diff: lily/tuplet-iterator.cc

Issue 579240043: Issue 4550: Avoid "using namespace std;" in included files (Take 2) (Closed)
Patch Set: Created 5 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 1998--2020 Han-Wen Nienhuys <hanwen@xs4all.nl>, 4 Copyright (C) 1998--2020 Han-Wen Nienhuys <hanwen@xs4all.nl>,
5 Erik Sandberg <mandolaerik@gmail.com> 5 Erik Sandberg <mandolaerik@gmail.com>
6 6
7 LilyPond is free software: you can redistribute it and/or modify 7 LilyPond is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or 9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 Tuplet_iterator::Tuplet_iterator () 85 Tuplet_iterator::Tuplet_iterator ()
86 { 86 {
87 spanner_duration_ = next_split_mom_ = 0; 87 spanner_duration_ = next_split_mom_ = 0;
88 synthesized_events_ = SCM_EOL; 88 synthesized_events_ = SCM_EOL;
89 } 89 }
90 90
91 Moment 91 Moment
92 Tuplet_iterator::pending_moment () const 92 Tuplet_iterator::pending_moment () const
93 { 93 {
94 Moment next_mom = Music_wrapper_iterator::pending_moment (); 94 Moment next_mom = Music_wrapper_iterator::pending_moment ();
95 next_mom = min (next_mom, next_split_mom_); 95 next_mom = std::min (next_mom, next_split_mom_);
96 96
97 return next_mom; 97 return next_mom;
98 } 98 }
99 99
100 void 100 void
101 Tuplet_iterator::process (Moment m) 101 Tuplet_iterator::process (Moment m)
102 { 102 {
103 if (spanner_duration_.to_bool () 103 if (spanner_duration_.to_bool ()
104 && m.main_part_ == next_split_mom_) 104 && m.main_part_ == next_split_mom_)
105 { 105 {
106 descend_to_bottom_context (); 106 descend_to_bottom_context ();
107 if (tuplet_handler_.get_context ()) 107 if (tuplet_handler_.get_context ())
108 create_event (STOP)->send_to_context (tuplet_handler_.get_context ()); 108 create_event (STOP)->send_to_context (tuplet_handler_.get_context ());
109 109
110 if (m.main_part_ < music_get_length ().main_part_) 110 if (m.main_part_ < music_get_length ().main_part_)
111 { 111 {
112 spanner_duration_ = 112 spanner_duration_ =
113 min (music_get_length () - next_split_mom_, spanner_duration_); 113 std::min (music_get_length () - next_split_mom_, spanner_duration_);
114 tuplet_handler_.set_context (get_outlet ()); 114 tuplet_handler_.set_context (get_outlet ());
115 report_event (create_event (START)); 115 report_event (create_event (START));
116 116
117 next_split_mom_ += spanner_duration_; 117 next_split_mom_ += spanner_duration_;
118 } 118 }
119 else 119 else
120 tuplet_handler_.set_context (0); 120 tuplet_handler_.set_context (0);
121 } 121 }
122 Music_wrapper_iterator::process (m); 122 Music_wrapper_iterator::process (m);
123 if (child_iter_ && child_iter_->ok ()) 123 if (child_iter_ && child_iter_->ok ())
(...skipping 19 matching lines...) Expand all
143 } 143 }
144 144
145 void 145 void
146 Tuplet_iterator::derived_mark () const 146 Tuplet_iterator::derived_mark () const
147 { 147 {
148 scm_gc_mark (synthesized_events_); 148 scm_gc_mark (synthesized_events_);
149 Music_wrapper_iterator::derived_mark (); 149 Music_wrapper_iterator::derived_mark ();
150 } 150 }
151 151
152 IMPLEMENT_CTOR_CALLBACK (Tuplet_iterator); 152 IMPLEMENT_CTOR_CALLBACK (Tuplet_iterator);
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b