MCPcopy Create free account
hub / github.com/KaisenAmin/c_std / priority_queue_is_less

Function priority_queue_is_less

priority_queue/priority_queue.c:786–797  ·  view source on GitHub ↗

* @brief Lexicographic less-than over the underlying storage bytes. * * Returns false if either operand is NULL. * * @param a Left queue. * @param b Right queue. * @return true if @p a is lexicographically less than @p b. */

Source from the content-addressed store, hash-verified

784 * Returns false if either operand is NULL.
785 *
786 * @param a Left queue.
787 * @param b Right queue.
788 * @return true if @p a is lexicographically less than @p b.
789 */
790bool priority_queue_is_less(const PriorityQueue* a, const PriorityQueue* b) {
791 PQUEUE_LOG("[priority_queue_is_less]: enter a=%p b=%p", (const void*)a, (const void*)b);
792 if (!a || !b || !a->vec || !b->vec) {
793 PQUEUE_LOG("[priority_queue_is_less]: one receiver NULL -> false");
794 return false;
795 }
796
797 bool out = vector_is_less(a->vec, b->vec);
798 PQUEUE_LOG("[priority_queue_is_less]: exit -> %s", out ? "true" : "false");
799
800 return out;

Callers 1

Calls 1

vector_is_lessFunction · 0.85

Tested by

no test coverage detected