mirror of https://github.com/qt/qt3d.git
Eradicate Java-style iterators and mark the module clean
Change-Id: I81ef72c1cdd589ccedfd7141116df50a49bb1622 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
0570d73b61
commit
d38db1a6b5
|
|
@ -4,5 +4,6 @@ QT3D_BUILD_ROOT = $$shadowed($$PWD)
|
|||
load(qt_build_config)
|
||||
|
||||
DEFINES += QT_NO_FOREACH
|
||||
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
|
||||
|
||||
MODULE_VERSION = 5.14.0
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ QVector<Qt3DCore::QNodeId> BufferManager::takeBuffersToRelease()
|
|||
{
|
||||
QMutexLocker lock(&m_mutex);
|
||||
QVector<Qt3DCore::QNodeId> buffersToRelease;
|
||||
QMutableHashIterator<Qt3DCore::QNodeId, int> it(m_bufferReferences);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
for (auto it = m_bufferReferences.begin(), end = m_bufferReferences.end(); it != end; /*erasing*/) {
|
||||
if (it.value() == 0) {
|
||||
buffersToRelease.append(it.key());
|
||||
it.remove();
|
||||
it = m_bufferReferences.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
return buffersToRelease;
|
||||
|
|
|
|||
Loading…
Reference in New Issue