From 8b84a0c36fbc2dfec3386bf3ca14ec48802dc9cf Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 28 Sep 2022 18:46:58 +0200 Subject: [PATCH] Add explicit BBT_Offset print function (like timeline.h has) --- libs/temporal/temporal/bbt_time.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/temporal/temporal/bbt_time.h b/libs/temporal/temporal/bbt_time.h index 5d654c8eaf..010d28ec31 100644 --- a/libs/temporal/temporal/bbt_time.h +++ b/libs/temporal/temporal/bbt_time.h @@ -250,6 +250,12 @@ struct LIBTEMPORAL_API BBT_Offset operator bool() const { return bars == 0 && beats == 0 && ticks == 0; } + + std::string str () const { + std::ostringstream os; + os << bars << '|' << beats << '|' << ticks; + return os.str (); + } }; inline BBT_Offset LIBTEMPORAL_API bbt_delta (Temporal::BBT_Time const & a, Temporal::BBT_Time const & b) {