MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / operator<

Method operator<

Engine/source/ts/tsThread.cpp:474–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474S32 TSThread::operator<(const TSThread & th2) const
475{
476 if (getSequence()->isBlend() == th2.getSequence()->isBlend())
477 {
478 // both blend or neither blend, sort based on priority only -- higher priority first
479 S32 ret = 0; // do it this way to (hopefully) take advantage of 'conditional move' assembly instruction
480 if (priority > th2.priority)
481 ret = -1;
482 if (th2.priority > priority)
483 ret = 1;
484 return ret;
485 }
486 else
487 {
488 // one is blend, the other is not...sort based on blend -- non-blended first
489 AssertFatal(!getSequence()->isBlend() || !th2.getSequence()->isBlend(),"compareThreads: unequal 'trues'");
490
491 S32 ret = -1; // do it this way to (hopefully) take advantage of 'conditional move' assembly instruction
492 if (getSequence()->isBlend())
493 ret = 1;
494 return ret;
495 }
496}
497
498
499//-------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

isBlendMethod · 0.80
getSequenceMethod · 0.45

Tested by

no test coverage detected