diff options
author | Thiago Macieira <thiago@kde.org> | 2011-07-07 18:48:47 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-22 00:16:33 +0200 |
commit | c2ca2d7fb35a866d634b8707596cae0ab6205448 (patch) | |
tree | c0df2cb4da636032192dda597df0e0167bbf4cd7 /src/corelib/tools/qstring.h | |
parent | 5e0c7ebdf10ba4513671ad92ddf64e6989e58a1f (diff) |
Add Q_DECL_CONSTEXPR to a QChar, QLatin1Char and QLatin1String constructors
These types now technically are trivially-constructible and
standard-layout in C++0x.
Change-Id: I455bd905fd6e237a1dff517b86dcbe59d571266f
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r-- | src/corelib/tools/qstring.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 313b4769e7..5013e27826 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -639,10 +639,10 @@ public: }; -class Q_CORE_EXPORT QLatin1String +class QLatin1String { public: - inline explicit QLatin1String(const char *s) : m_size(s ? int(strlen(s)) : 0), m_data(s) {} + Q_DECL_CONSTEXPR inline explicit QLatin1String(const char *s) : m_size(s ? int(strlen(s)) : 0), m_data(s) {} inline const char *latin1() const { return m_data; } inline int size() const { return m_size; } |