QAnyStringView: fix MSVC warning C4702
The previous fix attempt at 8ba8d1346a562347c398bdd0529d34f94f2ac698 does not work when C++20 mode is enabled. MSVC optimizes away the "else" block but triggers warning C4702 on "return true". Moving the return line into the "else" block ensures that it is optimized away too. Change-Id: I9ef02cd3631ff78091530b6fb2b91c2eddcbab5d Fixes: QTBUG-104836 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org> (cherry picked from commit 4bfdf6a3d156184579e9fc66224754a6e66159dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9b8777d493
commit
30786ef596
@ -72,8 +72,8 @@ private:
|
||||
if (uchar(str[i]) > 0x7f)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user