Avoid warnings with clang 6
warning: 'this' pointer cannot be null in well-defined C++ code The code tries to be smart but compilers warn about this unfortunately. Change-Id: Ifb8deafe8834d580beef829a3079ae9222acfa8f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
parent
f3fad26bc9
commit
b596acbefb
@ -251,9 +251,7 @@ struct AnchorVertexPair : public AnchorVertex {
|
|||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
inline QString AnchorVertex::toString() const
|
inline QString AnchorVertex::toString() const
|
||||||
{
|
{
|
||||||
if (!this) {
|
if (m_type == Pair) {
|
||||||
return QLatin1String("NULL");
|
|
||||||
} else if (m_type == Pair) {
|
|
||||||
const AnchorVertexPair *vp = static_cast<const AnchorVertexPair *>(this);
|
const AnchorVertexPair *vp = static_cast<const AnchorVertexPair *>(this);
|
||||||
return QString::fromLatin1("(%1, %2)").arg(vp->m_first->toString()).arg(vp->m_second->toString());
|
return QString::fromLatin1("(%1, %2)").arg(vp->m_first->toString()).arg(vp->m_second->toString());
|
||||||
} else if (!m_item) {
|
} else if (!m_item) {
|
||||||
|
Loading…
Reference in New Issue
Block a user