summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-07-25 12:03:28 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-11-05 14:38:05 +0000
commit491ccf3b85d0ba863445ead04b5e122d79e94865 (patch)
treecf320c1ef3907dbb0b911fc7e6ee1afccd500325 /src/corelib/tools/qstring.cpp
parent4d76352ae0ebb279989c73e8a8938c641ac42d77 (diff)
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>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r--src/corelib/tools/qstring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 13d8a3864b..a88b48c767 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -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