LEFT | RIGHT |
(no file at all) | |
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) 1997--2019 Jan Nieuwenhuizen <janneke@gnu.org> | 4 Copyright (C) 1997--2019 Jan Nieuwenhuizen <janneke@gnu.org> |
5 Han-Wen Nienhuys <hanwen@xs4all.nl> | 5 Han-Wen Nienhuys <hanwen@xs4all.nl> |
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 return mom * factor_; | 127 return mom * factor_; |
128 } | 128 } |
129 | 129 |
130 string | 130 string |
131 Duration::to_string () const | 131 Duration::to_string () const |
132 { | 132 { |
133 string s; | 133 string s; |
134 | 134 |
135 if (durlog_ < 0) | 135 if (durlog_ < 0) |
136 s = "log = " + ::to_string (durlog_); | 136 s = "log = " + std::to_string (durlog_); |
137 else | 137 else |
138 s = ::to_string (1 << durlog_); | 138 s = std::to_string (1 << durlog_); |
139 | 139 |
140 s += ::to_string ('.', dots_); | 140 if (dots_ > 0) |
| 141 s += string (dots_, '.'); |
141 if (factor_ != Moment (Rational (1, 1))) | 142 if (factor_ != Moment (Rational (1, 1))) |
142 s += "*" + factor_.to_string (); | 143 s += "*" + factor_.to_string (); |
143 return s; | 144 return s; |
144 } | 145 } |
145 | 146 |
146 const char * const Duration::type_p_name_ = "ly:duration?"; | 147 const char * const Duration::type_p_name_ = "ly:duration?"; |
147 | 148 |
148 | 149 |
149 int | 150 int |
150 Duration::print_smob (SCM port, scm_print_state *) const | 151 Duration::print_smob (SCM port, scm_print_state *) const |
(...skipping 22 matching lines...) Expand all Loading... |
173 Duration::duration_log () const | 174 Duration::duration_log () const |
174 { | 175 { |
175 return durlog_; | 176 return durlog_; |
176 } | 177 } |
177 | 178 |
178 int | 179 int |
179 Duration::dot_count () const | 180 Duration::dot_count () const |
180 { | 181 { |
181 return dots_; | 182 return dots_; |
182 } | 183 } |
LEFT | RIGHT |