Use QAtomicInt::load() and ::store()
The operator=(int) and implicit int cast operators are deprecated and will be removed. Change-Id: I5091d705fba45195239c901f210355e09e123faa Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
e3a8c165ea
commit
fbac3a0647
@@ -105,12 +105,12 @@ QAudioRingBuffer::~QAudioRingBuffer()
|
||||
|
||||
int QAudioRingBuffer::used() const
|
||||
{
|
||||
return m_bufferUsed;
|
||||
return m_bufferUsed.load();
|
||||
}
|
||||
|
||||
int QAudioRingBuffer::free() const
|
||||
{
|
||||
return m_bufferSize - m_bufferUsed;
|
||||
return m_bufferSize - m_bufferUsed.load();
|
||||
}
|
||||
|
||||
int QAudioRingBuffer::size() const
|
||||
@@ -122,7 +122,7 @@ void QAudioRingBuffer::reset()
|
||||
{
|
||||
m_readPos = 0;
|
||||
m_writePos = 0;
|
||||
m_bufferUsed = 0;
|
||||
m_bufferUsed.store(0);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user