From aad71a496a141d226f1295be709e9796fdc2439e Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 22 Jun 2019 21:26:18 +0200 Subject: [PATCH] Boost-1.65: fix another integer ambiguity problem with boost::rational the "improved" boost::rational can no longer compute 1/x quite brilliant well... the reason is again signed vs unsigned int. FrameRate is based on unsigned int (since a negative frame rate makes no sense). --- src/lib/time/timevalue.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/time/timevalue.hpp b/src/lib/time/timevalue.hpp index 277aa553c..0755e4969 100644 --- a/src/lib/time/timevalue.hpp +++ b/src/lib/time/timevalue.hpp @@ -572,6 +572,13 @@ namespace time { operator std::string() const; }; + /** convenient conversion to duration in fractional seconds */ + inline FSecs + operator/ (int n, FrameRate rate) + { + return n / boost::rational_cast (rate); + } +