Make BBT_Time::print_padded const

As this method does not modify BBT_Time it can be const.  This allows such
method to be called over a const BBT_Time instance.
This commit is contained in:
Nil Geisweiller 2021-08-30 02:24:38 +03:00
parent 2de2ab8f91
commit 21c94b23f3

View File

@ -124,7 +124,7 @@ struct LIBTEMPORAL_API BBT_Time
BBT_Time next_bar () const { return (bars == -1) ? BBT_Time (1, 1, 0) : BBT_Time (bars+1, 1, 0); }
BBT_Time prev_bar () const { return (bars == 1) ? BBT_Time (-1, 1, 0) : BBT_Time (bars-1, 1, 0); }
void print_padded (std::ostream& o) {
void print_padded (std::ostream& o) const {
o << std::setfill ('0') << std::right
<< std::setw (3) << bars << "|"
<< std::setw (2) << beats << "|"