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);
|
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)
|
Framerate::Framerate(double fps)
|
||||||
: denominator(default_denominator)
|
: denominator(default_denominator)
|
||||||
, numerator(int64_t(fps * denominator))
|
, numerator(int64_t(fps * denominator))
|
||||||
|
@ -222,20 +214,14 @@ Framerate::Framerate(std::vector<int> const& timecodes)
|
||||||
SetFromTimecodes();
|
SetFromTimecodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
Framerate::~Framerate() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void Framerate::swap(Framerate &right) throw() {
|
void Framerate::swap(Framerate &right) throw() {
|
||||||
std::swap(numerator, right.numerator);
|
using std::swap;
|
||||||
std::swap(denominator, right.denominator);
|
swap(numerator, right.numerator);
|
||||||
std::swap(last, right.last);
|
swap(denominator, right.denominator);
|
||||||
std::swap(timecodes, right.timecodes);
|
swap(last, right.last);
|
||||||
|
swap(timecodes, right.timecodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
Framerate &Framerate::operator=(Framerate right) {
|
|
||||||
std::swap(*this, right);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
Framerate &Framerate::operator=(double fps) {
|
Framerate &Framerate::operator=(double fps) {
|
||||||
return *this = Framerate(fps);
|
return *this = Framerate(fps);
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,9 +86,6 @@ class Framerate {
|
||||||
/// Set FPS properties from the timecodes vector
|
/// Set FPS properties from the timecodes vector
|
||||||
void SetFromTimecodes();
|
void SetFromTimecodes();
|
||||||
public:
|
public:
|
||||||
/// Copy constructor
|
|
||||||
Framerate(Framerate const&);
|
|
||||||
|
|
||||||
/// @brief VFR from timecodes file
|
/// @brief VFR from timecodes file
|
||||||
/// @param filename File with v1 or v2 timecodes
|
/// @param filename File with v1 or v2 timecodes
|
||||||
///
|
///
|
||||||
|
@ -111,11 +108,6 @@ public:
|
||||||
/// @param timecodes Vector of frame start times in milliseconds
|
/// @param timecodes Vector of frame start times in milliseconds
|
||||||
Framerate(std::vector<int> const& timecodes);
|
Framerate(std::vector<int> const& timecodes);
|
||||||
|
|
||||||
/// Destructor
|
|
||||||
~Framerate();
|
|
||||||
|
|
||||||
/// Atomic assignment operator
|
|
||||||
Framerate &operator=(Framerate);
|
|
||||||
/// Atomic CFR assignment operator
|
/// Atomic CFR assignment operator
|
||||||
Framerate &operator=(double);
|
Framerate &operator=(double);
|
||||||
/// Helper function for the std::swap specialization
|
/// Helper function for the std::swap specialization
|
||||||
|
|
Loading…
Reference in a new issue