GCC warnings.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-05-13 18:10:13 +03:00
parent c8a041e4f2
commit 4ec4f276fc

View File

@ -67,6 +67,10 @@ VToolRotation::VToolRotation(VAbstractPattern *doc, VContainer *data, quint32 id
// This check helps to find missed objects in the switch
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 7, "Not all objects were handled.");
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
switch(static_cast<GOType>(obj->getType()))
{
case GOType::Point:
@ -119,6 +123,9 @@ VToolRotation::VToolRotation(VAbstractPattern *doc, VContainer *data, quint32 id
case GOType::Unknown:
break;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
}
ToolCreation(typeCreation);
@ -190,6 +197,10 @@ VToolRotation *VToolRotation::Create(const quint32 _id, const quint32 &origin, Q
// This check helps to find missed objects in the switch
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 7, "Not all objects were handled.");
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
switch(static_cast<GOType>(obj->getType()))
{
case GOType::Point:
@ -217,6 +228,9 @@ VToolRotation *VToolRotation::Create(const quint32 _id, const quint32 &origin, Q
case GOType::Unknown:
break;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
}
}
else
@ -229,6 +243,10 @@ VToolRotation *VToolRotation::Create(const quint32 _id, const quint32 &origin, Q
// This check helps to find missed objects in the switch
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 7, "Not all objects were handled.");
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
switch(static_cast<GOType>(obj->getType()))
{
case GOType::Point:
@ -257,6 +275,9 @@ VToolRotation *VToolRotation::Create(const quint32 _id, const quint32 &origin, Q
case GOType::Unknown:
break;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
}
if (parse != Document::FullParse)
{