summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2011-07-07 18:48:47 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-22 00:16:33 +0200
commitc2ca2d7fb35a866d634b8707596cae0ab6205448 (patch)
treec0df2cb4da636032192dda597df0e0167bbf4cd7 /src/corelib/tools/qstring.h
parent5e0c7ebdf10ba4513671ad92ddf64e6989e58a1f (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.h4
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; }