summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qtextcodec.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/codecs/qtextcodec.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/codecs/qtextcodec.cpp')
-rw-r--r--src/corelib/codecs/qtextcodec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 88987865c4..c55f93b949 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -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