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:
Friedemann Kleint 2019-11-25 12:58:21 +01:00
parent 00dc70ae70
commit a10e61dce4
6 changed files with 9 additions and 15 deletions

View File

@ -59,7 +59,6 @@ ChannelMapping::ChannelMapping()
, m_componentCount(0)
, m_propertyName(nullptr)
, m_callback(nullptr)
, m_callbackFlags(0)
, m_skeletonId()
, m_mappingType(MappingType::ChannelMappingType)
{
@ -74,7 +73,7 @@ void ChannelMapping::cleanup()
m_propertyName = nullptr;
m_componentCount = 0;
m_callback = nullptr;
m_callbackFlags = 0;
m_callbackFlags = {};
m_skeletonId = Qt3DCore::QNodeId();
}

View File

@ -51,7 +51,6 @@ QCallbackMappingPrivate::QCallbackMappingPrivate()
, m_channelName()
, m_type(static_cast<int>(QVariant::Invalid))
, m_callback(nullptr)
, m_callbackFlags(0)
{
m_mappingType = QChannelMappingCreatedChangeBase::CallbackMapping;
}

View File

@ -1889,9 +1889,9 @@ QVector<Qt3DCore::QAspectJobPtr> Renderer::renderBinJobs()
m_updateLevelOfDetailJob->setFrameGraphRoot(frameGraphRoot());
const BackendNodeDirtySet dirtyBitsForFrame = m_dirtyBits.marked | m_dirtyBits.remaining;
m_dirtyBits.marked = 0;
m_dirtyBits.remaining = 0;
BackendNodeDirtySet notCleared = 0;
m_dirtyBits.marked = {};
m_dirtyBits.remaining = {};
BackendNodeDirtySet notCleared = {};
// Add jobs
const bool entitiesEnabledDirty = dirtyBitsForFrame & AbstractRenderer::EntityEnabledDirty;

View File

@ -352,8 +352,8 @@ private:
QAtomicInt m_exposed;
struct DirtyBits {
BackendNodeDirtySet marked = 0; // marked dirty since last job build
BackendNodeDirtySet remaining = 0; // remaining dirty after jobs have finished
BackendNodeDirtySet marked; // marked dirty since last job build
BackendNodeDirtySet remaining; // remaining dirty after jobs have finished
};
DirtyBits m_dirtyBits;

View File

@ -30,11 +30,7 @@
QT_BEGIN_NAMESPACE
TestRenderer::TestRenderer()
: m_changes(0)
, m_managers(nullptr)
{
}
TestRenderer::TestRenderer() = default;
TestRenderer::~TestRenderer()
{
@ -60,7 +56,7 @@ void TestRenderer::clearDirtyBits(Qt3DRender::Render::AbstractRenderer::BackendN
void TestRenderer::resetDirty()
{
m_changes = 0;
m_changes = {};
}
QVariant TestRenderer::executeCommand(const QStringList &args)

View File

@ -90,7 +90,7 @@ public:
protected:
Qt3DRender::Render::AbstractRenderer::BackendNodeDirtySet m_changes;
Qt3DRender::Render::NodeManagers *m_managers;
Qt3DRender::Render::NodeManagers *m_managers = nullptr;
};
QT_END_NAMESPACE