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:
parent
dc301231cf
commit
aad71a496a
1 changed files with 7 additions and 0 deletions
|
|
@ -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<FSecs> (rate);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue