change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 additions and 68888 deletions
+27 -24
View File
@@ -20,52 +20,55 @@
#include "renderjobtracker.h"
namespace olive {
namespace olive
{
void RenderJobTracker::insert(const TimeRange &range, JobTime job_time)
{
// First remove any ranges with this (code copied
TimeRangeList::util_remove(&jobs_, range);
// First remove any ranges with this (code copied
TimeRangeList::util_remove(&jobs_, range);
// Now append the job
TimeRangeWithJob job(range, job_time);
jobs_.push_back(job);
// Now append the job
TimeRangeWithJob job(range, job_time);
jobs_.push_back(job);
}
void RenderJobTracker::insert(const TimeRangeList &ranges, JobTime job_time)
{
foreach (const TimeRange &r, ranges) {
insert(r, job_time);
}
foreach (const TimeRange &r, ranges) {
insert(r, job_time);
}
}
void RenderJobTracker::clear()
{
jobs_.clear();
jobs_.clear();
}
bool RenderJobTracker::isCurrent(const rational &time, JobTime job_time) const
{
for (auto it=jobs_.crbegin(); it!=jobs_.crend(); it++) {
if (it->Contains(time)) {
return job_time >= it->GetJobTime();
}
}
for (auto it = jobs_.crbegin(); it != jobs_.crend(); it++) {
if (it->Contains(time)) {
return job_time >= it->GetJobTime();
}
}
return false;
return false;
}
TimeRangeList RenderJobTracker::getCurrentSubRanges(const TimeRange &range, const JobTime &job_time) const
TimeRangeList
RenderJobTracker::getCurrentSubRanges(const TimeRange &range,
const JobTime &job_time) const
{
TimeRangeList current_ranges;
TimeRangeList current_ranges;
for (auto it=jobs_.crbegin(); it!=jobs_.crend(); it++) {
if (job_time >= it->GetJobTime() && it->OverlapsWith(range)) {
current_ranges.insert(it->Intersected(range));
}
}
for (auto it = jobs_.crbegin(); it != jobs_.crend(); it++) {
if (job_time >= it->GetJobTime() && it->OverlapsWith(range)) {
current_ranges.insert(it->Intersected(range));
}
}
return current_ranges;
return current_ranges;
}
}