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 Pick-to: 6.5 6.4 Fixes: QTBUG-104836 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
This commit is contained in:
parent
c307cbea90
commit
4bfdf6a3d1
@ -122,8 +122,8 @@ private:
|
||||
if (uchar(str[i]) > 0x7f)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user