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

Method operator<

Source/MediaInfo/TimeCode.h:277–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275 return !(*this == tc);
276 }
277 bool operator< (const TimeCode& tc) const
278 {
279 uint64_t Total1 = ((uint64_t)GetHours()) << 16
280 | ((uint64_t)GetMinutes()) << 8
281 | ((uint64_t)GetSeconds());
282 uint64_t Total2 = ((uint64_t)tc.GetHours()) << 16
283 | ((uint64_t)tc.GetMinutes()) << 8
284 | ((uint64_t)tc.GetSeconds());
285 if (Total1 == Total2)
286 {
287 if (GetFramesMax() == tc.GetFramesMax())
288 return GetFrames() < tc.GetFrames();
289 uint64_t Mix1 = ((int64_t)GetFrames()) * (((int64_t)tc.GetFramesMax()) + 1);
290 uint64_t Mix2 = ((int64_t)tc.GetFrames()) * (((int64_t)GetFramesMax()) + 1);
291 return Mix1 < Mix2;
292 }
293 return Total1 < Total2;
294 }
295 bool operator> (const TimeCode& tc) const
296 {
297 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