Removes the top element from the queue. @retval Pointer to the (key of the) removed element. @note This function is for unit testing, where we push elements into to the queue, and test that the appropriate keys are retained. Interleaving of push() and pop() operations has not been tested. */
| 116 | Interleaving of push() and pop() operations has not been tested. |
| 117 | */ |
| 118 | Key_type **pop() |
| 119 | { |
| 120 | // Don't return the extra element to the client code. |
| 121 | if (queue_is_full((&m_queue))) |
| 122 | queue_remove(&m_queue, 0); |
| 123 | DBUG_ASSERT(m_queue.elements > 0); |
| 124 | if (m_queue.elements == 0) |
| 125 | return NULL; |
| 126 | return reinterpret_cast<Key_type**>(queue_remove(&m_queue, 0)); |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | The number of elements in the queue. |
nothing calls this directly
no test coverage detected