inline QRingBuffer functions (provisional, needs to be finished)