From 21c94b23f3e2fa164a868585800e43b0c4249b18 Mon Sep 17 00:00:00 2001 From: Nil Geisweiller Date: Mon, 30 Aug 2021 02:24:38 +0300 Subject: [PATCH] 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. --- libs/temporal/temporal/bbt_time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/temporal/temporal/bbt_time.h b/libs/temporal/temporal/bbt_time.h index 63553f2de8..abf8613977 100644 --- a/libs/temporal/temporal/bbt_time.h +++ b/libs/temporal/temporal/bbt_time.h @@ -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 << "|"