diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-04 12:25:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-05 15:53:48 +0100 |
| commit | 42a65cba0d8da23c12af52015e66cd9dc0b5a5fa (patch) | |
| tree | ff0a017c49d0975f21a5314d2f77be20f68bd379 /src/types.cc | |
| parent | 943e75e0ac5730714f3823771f127fe78e4cf82b (diff) | |
Initial work on SMPTE subtitles.
Diffstat (limited to 'src/types.cc')
| -rw-r--r-- | src/types.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/types.cc b/src/types.cc index e86e999c..37666701 100644 --- a/src/types.cc +++ b/src/types.cc @@ -20,6 +20,7 @@ #include "raw_convert.h" #include "types.h" #include "exceptions.h" +#include "compose.hpp" #include <boost/algorithm/string.hpp> #include <vector> #include <cstdio> @@ -43,6 +44,12 @@ Fraction::Fraction (string s) denominator = raw_convert<int> (b[1]); } +string +Fraction::as_string () const +{ + return String::compose ("%1 %2", numerator, denominator); +} + bool dcp::operator== (Fraction const & a, Fraction const & b) { |
