MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / operator<=

Method operator<=

Source/MediaInfo/TimeCode.h:313–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311 return Total1 > Total2;
312 }
313 bool operator<= (const TimeCode& tc) const
314 {
315 uint64_t Total1 = ((uint64_t)GetHours()) << 16
316 | ((uint64_t)GetMinutes()) << 8
317 | ((uint64_t)GetSeconds());
318 uint64_t Total2 = ((uint64_t)tc.GetHours()) << 16
319 | ((uint64_t)tc.GetMinutes()) << 8
320 | ((uint64_t)tc.GetSeconds());
321 if (Total1 == Total2)
322 {
323 if (GetFramesMax() == tc.GetFramesMax())
324 return GetFrames() <= tc.GetFrames();
325 uint64_t Mix1 = ((int64_t)GetFrames()) * (((int64_t)tc.GetFramesMax()) + 1);
326 uint64_t Mix2 = ((int64_t)tc.GetFrames()) * (((int64_t)GetFramesMax()) + 1);
327 return Mix1 <= Mix2;
328 }
329 return Total1 < Total2;
330 }
331 bool operator>= (const TimeCode& tc) const
332 {
333 uint64_t Total1 = ((uint64_t)GetHours()) << 16

Callers

nothing calls this directly

Calls 5

GetHoursMethod · 0.80
GetMinutesMethod · 0.80
GetSecondsMethod · 0.80
GetFramesMaxMethod · 0.80
GetFramesMethod · 0.80

Tested by

no test coverage detected