Boost-1.65: fix another integer ambiguity problem with boost::rational

<rant>
the "improved" boost::rational can no longer compute 1/x
quite brilliant
</rant>

well... the reason is again signed vs unsigned int.
FrameRate is based on unsigned int (since a negative frame rate makes no sense).
This commit is contained in:
Fischlurch 2019-06-22 21:26:18 +02:00
parent dc301231cf
commit aad71a496a

View file

@ -572,6 +572,13 @@ namespace time {
operator std::string() const; operator std::string() const;
}; };
/** convenient conversion to duration in fractional seconds */
inline FSecs
operator/ (int n, FrameRate rate)
{
return n / boost::rational_cast<FSecs> (rate);
}