Mark two impossible code-paths with Q_UNREACHABLE
Change-Id: I8c04f512b078d4c13d759854b65f4d39b7b80e75 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
This commit is contained in:
parent
4785e39156
commit
085678a75e
@ -558,7 +558,7 @@ bool qt_splitLocaleName(QStringView name, QStringView *lang, QStringView *script
|
||||
state = NoState;
|
||||
break;
|
||||
case NoState: // Precluded by loop condition !
|
||||
Q_ASSERT(!"QLocale: This should never happen");
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -530,7 +530,8 @@ QString qulltoa(qulonglong number, int base, const QStringView zero)
|
||||
|
||||
number /= base;
|
||||
}
|
||||
} else {
|
||||
} else { // zero should always be either a non-surrogate or a surrogate pair:
|
||||
Q_UNREACHABLE();
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user