From 42a65cba0d8da23c12af52015e66cd9dc0b5a5fa Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 4 Jun 2015 12:25:48 +0100 Subject: Initial work on SMPTE subtitles. --- src/types.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/types.cc') 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 #include #include @@ -43,6 +44,12 @@ Fraction::Fraction (string s) denominator = raw_convert (b[1]); } +string +Fraction::as_string () const +{ + return String::compose ("%1 %2", numerator, denominator); +} + bool dcp::operator== (Fraction const & a, Fraction const & b) { -- cgit v1.2.3