diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-10-14 23:44:03 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-10-15 22:11:50 +0200 |
commit | 4af721dec18e61e5d57a452fbf2b2b52cdb193d8 (patch) | |
tree | 68c3f4ccc981e5cd5d6c1d3a1d6166a689586050 /src/corelib/io/qurl.cpp | |
parent | fc7676769251a27cbbc6d40d68f04bfe38511a5b (diff) |
QUrl: remove two unneeded Q_ASSERT()s
Q_UNREACHABLE/_RETURN() already contain such an assertion, we don't
need two of them.
Copy additional bits of information, if any, from the manual assertion
into a code comment.
Change-Id: I141b65d1293abf581272b2457015d4e52395d08b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-rw-r--r-- | src/corelib/io/qurl.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 591ed7fe87..4be07bcb0f 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3493,9 +3493,7 @@ static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &err switch (errorCode) { case QUrlPrivate::NoError: - Q_ASSERT_X(false, "QUrl::errorString", - "Impossible: QUrl::errorString should have treated this condition"); - Q_UNREACHABLE_RETURN(QString()); + Q_UNREACHABLE_RETURN(QString()); // QUrl::errorString should have treated this condition case QUrlPrivate::InvalidSchemeError: { auto msg = "Invalid scheme (character '%1' not permitted)"_L1; @@ -3552,7 +3550,6 @@ static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &err return QStringLiteral("Relative URL's path component contains ':' before any '/'"); } - Q_ASSERT_X(false, "QUrl::errorString", "Cannot happen, unknown error"); Q_UNREACHABLE_RETURN(QString()); } |