Mark qt_from_latin1() as nothrow
It's used from a different TU, too, so we can't rely on the compiler to inspect it to draw this conclusion itself. This function has technically not a wide contract, because the output buffer needs to be large enough to hold the result. However, this precondition cannot be checked from within the function, therefore no assertion can ever be added and the nothrow marker becomes acceptable (even desireable). Change-Id: I2dc6c4f3d9d8147c6483865c5c4bbc8e9af291b7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
4d76352ae0
commit
491ccf3b85
@ -993,7 +993,7 @@ QString QTextDecoder::toUnicode(const char *chars, int len)
|
||||
}
|
||||
|
||||
// in qstring.cpp:
|
||||
void qt_from_latin1(ushort *dst, const char *str, size_t size);
|
||||
void qt_from_latin1(ushort *dst, const char *str, size_t size) Q_DECL_NOTHROW;
|
||||
|
||||
/*! \overload
|
||||
|
||||
|
@ -203,7 +203,7 @@ inline RetType UnrollTailLoop<0>::exec(int, RetType returnIfExited, Functor1, Fu
|
||||
#endif
|
||||
|
||||
// conversion between Latin 1 and UTF-16
|
||||
void qt_from_latin1(ushort *dst, const char *str, size_t size)
|
||||
void qt_from_latin1(ushort *dst, const char *str, size_t size) Q_DECL_NOTHROW
|
||||
{
|
||||
/* SIMD:
|
||||
* Unpacking with SSE has been shown to improve performance on recent CPUs
|
||||
|
Loading…
Reference in New Issue
Block a user