forked from mia/Aegisub
Remove pointless operator=, copy constructor and destructor from agi::vfr::Framerate
Originally committed to SVN as r6120.
This commit is contained in:
parent
a91f6f7880
commit
1fbf2ef218
2 changed files with 5 additions and 27 deletions
|
@ -179,14 +179,6 @@ static int64_t v1_parse(line_iterator<std::string> file, std::string line, std::
|
|||
return int64_t(fps * default_denominator);
|
||||
}
|
||||
|
||||
Framerate::Framerate(Framerate const& that)
|
||||
: numerator(that.numerator)
|
||||
, denominator(that.denominator)
|
||||
, last(that.last)
|
||||
, timecodes(that.timecodes)
|
||||
{
|
||||
}
|
||||
|
||||
Framerate::Framerate(double fps)
|
||||
: denominator(default_denominator)
|
||||
, numerator(int64_t(fps * denominator))
|
||||
|
@ -222,20 +214,14 @@ Framerate::Framerate(std::vector<int> const& timecodes)
|
|||
SetFromTimecodes();
|
||||
}
|
||||
|
||||
Framerate::~Framerate() {
|
||||
}
|
||||
|
||||
void Framerate::swap(Framerate &right) throw() {
|
||||
std::swap(numerator, right.numerator);
|
||||
std::swap(denominator, right.denominator);
|
||||
std::swap(last, right.last);
|
||||
std::swap(timecodes, right.timecodes);
|
||||
using std::swap;
|
||||
swap(numerator, right.numerator);
|
||||
swap(denominator, right.denominator);
|
||||
swap(last, right.last);
|
||||
swap(timecodes, right.timecodes);
|
||||
}
|
||||
|
||||
Framerate &Framerate::operator=(Framerate right) {
|
||||
std::swap(*this, right);
|
||||
return *this;
|
||||
}
|
||||
Framerate &Framerate::operator=(double fps) {
|
||||
return *this = Framerate(fps);
|
||||
}
|
||||
|
|
|
@ -86,9 +86,6 @@ class Framerate {
|
|||
/// Set FPS properties from the timecodes vector
|
||||
void SetFromTimecodes();
|
||||
public:
|
||||
/// Copy constructor
|
||||
Framerate(Framerate const&);
|
||||
|
||||
/// @brief VFR from timecodes file
|
||||
/// @param filename File with v1 or v2 timecodes
|
||||
///
|
||||
|
@ -111,11 +108,6 @@ public:
|
|||
/// @param timecodes Vector of frame start times in milliseconds
|
||||
Framerate(std::vector<int> const& timecodes);
|
||||
|
||||
/// Destructor
|
||||
~Framerate();
|
||||
|
||||
/// Atomic assignment operator
|
||||
Framerate &operator=(Framerate);
|
||||
/// Atomic CFR assignment operator
|
||||
Framerate &operator=(double);
|
||||
/// Helper function for the std::swap specialization
|
||||
|
|
Loading…
Reference in a new issue