mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
Renamed TimeSegment to TimeRange
This commit is contained in:
21
src/TimeRange.cpp
Normal file
21
src/TimeRange.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "TimeRange.h"
|
||||
#include <stdexcept>
|
||||
|
||||
TimeRange::TimeRange(centiseconds start, centiseconds end) :
|
||||
start(start),
|
||||
end(end)
|
||||
{
|
||||
if (start > end) throw std::invalid_argument("start must not be less than end.");
|
||||
}
|
||||
|
||||
centiseconds TimeRange::getStart() const {
|
||||
return start;
|
||||
}
|
||||
|
||||
centiseconds TimeRange::getEnd() const {
|
||||
return end;
|
||||
}
|
||||
|
||||
centiseconds TimeRange::getLength() const {
|
||||
return end - start;
|
||||
}
|
||||
Reference in New Issue
Block a user