No-op: remove all trailing whitespace.
[dcpomatic.git] / src / lib / frame_rate_change.cc
index 3e9c4b50528c4bf0fb3e4fe2fc786015d32c4a43..d327f8e31ad151d8cdd7e7c517b836c28394b78f 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "i18n.h"
 
+using std::string;
+
 static bool
 about_equal (float a, float b)
 {
@@ -35,14 +37,14 @@ about_equal (float a, float b)
            = Ff + Fd - Ff frames
            = Fd frames
            = Fd/f seconds
+
           So if we accept a difference of 1 frame, ie 1/f seconds, we can
           say that
 
           1/f = Fd/f
        ie 1 = Fd
        ie d = 1/F
+
           So for a 3hr film, ie F = 3 * 60 * 60 = 10800, the acceptable
           FPS error is 1/F ~= 0.0001 ~= 10-e4
        */
@@ -51,8 +53,10 @@ about_equal (float a, float b)
 }
 
 
-FrameRateChange::FrameRateChange (float source, int dcp)
-       : skip (false)
+FrameRateChange::FrameRateChange (float source_, int dcp_)
+       : source (source_)
+       , dcp (dcp_)
+       , skip (false)
        , repeat (1)
        , change_speed (false)
 {
@@ -71,6 +75,12 @@ FrameRateChange::FrameRateChange (float source, int dcp)
 
        speed_up = dcp / (source * factor());
        change_speed = !about_equal (speed_up, 1.0);
+}
+
+string
+FrameRateChange::description () const
+{
+       string description;
 
        if (!skip && repeat == 1 && !change_speed) {
                description = _("Content and DCP have the same rate.\n");
@@ -88,4 +98,6 @@ FrameRateChange::FrameRateChange (float source, int dcp)
                        description += String::compose (_("DCP will run at %1%% of the content speed.\n"), pc);
                }
        }
+
+       return description;
 }