From b0f4c9f1ad83d196eaf00d22a2886ff0f2764d0b Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 28 Jul 2015 13:03:15 -0700 Subject: [PATCH] Remove agi::vfr::Framerate's explicit swap implementation --- libaegisub/common/vfr.cpp | 8 -------- libaegisub/include/libaegisub/vfr.h | 11 ++++++++--- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/libaegisub/common/vfr.cpp b/libaegisub/common/vfr.cpp index 31480248c..c82fcdbee 100644 --- a/libaegisub/common/vfr.cpp +++ b/libaegisub/common/vfr.cpp @@ -171,14 +171,6 @@ Framerate::Framerate(std::initializer_list timecodes) SetFromTimecodes(); } -void Framerate::swap(Framerate &right) throw() { - using std::swap; - swap(numerator, right.numerator); - swap(denominator, right.denominator); - swap(last, right.last); - swap(timecodes, right.timecodes); -} - Framerate::Framerate(fs::path const& filename) : denominator(default_denominator) { diff --git a/libaegisub/include/libaegisub/vfr.h b/libaegisub/include/libaegisub/vfr.h index d929154fb..4f6e1b15d 100644 --- a/libaegisub/include/libaegisub/vfr.h +++ b/libaegisub/include/libaegisub/vfr.h @@ -76,6 +76,14 @@ class Framerate { /// Set FPS properties from the timecodes vector void SetFromTimecodes(); public: + Framerate(Framerate const&) = default; + Framerate& operator=(Framerate const&) = default; + +#ifndef _MSC_VER + Framerate(Framerate&&) = default; + Framerate& operator=(Framerate&&) = default; +#endif + /// @brief VFR from timecodes file /// @param filename File with v1 or v2 timecodes /// @@ -100,9 +108,6 @@ public: Framerate(std::vector timecodes); Framerate(std::initializer_list timecodes); - /// Helper function for the std::swap specialization - void swap(Framerate &right) throw(); - /// @brief Get the frame visible at a given time /// @param ms Time in milliseconds /// @param type Time mode