mirror of https://github.com/qt/qt3d.git
Avoid initializing QFlags with 0 or nullptr
It is being deprecated. Change-Id: Idb6e794be1a26a3ca7c1d19ac1f47e4a0125f11b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
00dc70ae70
commit
a10e61dce4
|
|
@ -59,7 +59,6 @@ ChannelMapping::ChannelMapping()
|
||||||
, m_componentCount(0)
|
, m_componentCount(0)
|
||||||
, m_propertyName(nullptr)
|
, m_propertyName(nullptr)
|
||||||
, m_callback(nullptr)
|
, m_callback(nullptr)
|
||||||
, m_callbackFlags(0)
|
|
||||||
, m_skeletonId()
|
, m_skeletonId()
|
||||||
, m_mappingType(MappingType::ChannelMappingType)
|
, m_mappingType(MappingType::ChannelMappingType)
|
||||||
{
|
{
|
||||||
|
|
@ -74,7 +73,7 @@ void ChannelMapping::cleanup()
|
||||||
m_propertyName = nullptr;
|
m_propertyName = nullptr;
|
||||||
m_componentCount = 0;
|
m_componentCount = 0;
|
||||||
m_callback = nullptr;
|
m_callback = nullptr;
|
||||||
m_callbackFlags = 0;
|
m_callbackFlags = {};
|
||||||
m_skeletonId = Qt3DCore::QNodeId();
|
m_skeletonId = Qt3DCore::QNodeId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ QCallbackMappingPrivate::QCallbackMappingPrivate()
|
||||||
, m_channelName()
|
, m_channelName()
|
||||||
, m_type(static_cast<int>(QVariant::Invalid))
|
, m_type(static_cast<int>(QVariant::Invalid))
|
||||||
, m_callback(nullptr)
|
, m_callback(nullptr)
|
||||||
, m_callbackFlags(0)
|
|
||||||
{
|
{
|
||||||
m_mappingType = QChannelMappingCreatedChangeBase::CallbackMapping;
|
m_mappingType = QChannelMappingCreatedChangeBase::CallbackMapping;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1889,9 +1889,9 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs()
|
||||||
m_updateLevelOfDetailJob->setFrameGraphRoot(frameGraphRoot());
|
m_updateLevelOfDetailJob->setFrameGraphRoot(frameGraphRoot());
|
||||||
|
|
||||||
const BackendNodeDirtySet dirtyBitsForFrame = m_dirtyBits.marked | m_dirtyBits.remaining;
|
const BackendNodeDirtySet dirtyBitsForFrame = m_dirtyBits.marked | m_dirtyBits.remaining;
|
||||||
m_dirtyBits.marked = 0;
|
m_dirtyBits.marked = {};
|
||||||
m_dirtyBits.remaining = 0;
|
m_dirtyBits.remaining = {};
|
||||||
BackendNodeDirtySet notCleared = 0;
|
BackendNodeDirtySet notCleared = {};
|
||||||
|
|
||||||
// Add jobs
|
// Add jobs
|
||||||
const bool entitiesEnabledDirty = dirtyBitsForFrame & AbstractRenderer::EntityEnabledDirty;
|
const bool entitiesEnabledDirty = dirtyBitsForFrame & AbstractRenderer::EntityEnabledDirty;
|
||||||
|
|
|
||||||
|
|
@ -352,8 +352,8 @@ private:
|
||||||
QAtomicInt m_exposed;
|
QAtomicInt m_exposed;
|
||||||
|
|
||||||
struct DirtyBits {
|
struct DirtyBits {
|
||||||
BackendNodeDirtySet marked = 0; // marked dirty since last job build
|
BackendNodeDirtySet marked; // marked dirty since last job build
|
||||||
BackendNodeDirtySet remaining = 0; // remaining dirty after jobs have finished
|
BackendNodeDirtySet remaining; // remaining dirty after jobs have finished
|
||||||
};
|
};
|
||||||
DirtyBits m_dirtyBits;
|
DirtyBits m_dirtyBits;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,7 @@
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
TestRenderer::TestRenderer()
|
TestRenderer::TestRenderer() = default;
|
||||||
: m_changes(0)
|
|
||||||
, m_managers(nullptr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
TestRenderer::~TestRenderer()
|
TestRenderer::~TestRenderer()
|
||||||
{
|
{
|
||||||
|
|
@ -60,7 +56,7 @@ void TestRenderer::clearDirtyBits(Qt3DRender::Render::AbstractRenderer::BackendN
|
||||||
|
|
||||||
void TestRenderer::resetDirty()
|
void TestRenderer::resetDirty()
|
||||||
{
|
{
|
||||||
m_changes = 0;
|
m_changes = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant TestRenderer::executeCommand(const QStringList &args)
|
QVariant TestRenderer::executeCommand(const QStringList &args)
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Qt3DRender::Render::AbstractRenderer::BackendNodeDirtySet m_changes;
|
Qt3DRender::Render::AbstractRenderer::BackendNodeDirtySet m_changes;
|
||||||
Qt3DRender::Render::NodeManagers *m_managers;
|
Qt3DRender::Render::NodeManagers *m_managers = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue