Compile QLatin1String with C++11
qstring.h: In constructor ‘QLatin1String::QLatin1String(const QByteArray&)’: qstring.h:667:129: error: ‘const char* QByteArray::constData() const’ is not ‘constexpr’ QByteArray has a destructor and therefore cannot be used in constexpr, so do not mark it as constexpr Change-Id: I037e9ae73a244660923eac791cc3e0082d1d7a63 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
3abc6be685
commit
09348c3efb
@ -664,7 +664,7 @@ class QLatin1String
|
||||
public:
|
||||
Q_DECL_CONSTEXPR 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, int sz) : m_size(sz), m_data(s) {}
|
||||
Q_DECL_CONSTEXPR inline explicit QLatin1String(const QByteArray &s) : m_size(strlen(s.constData())), m_data(s.constData()) {}
|
||||
inline explicit QLatin1String(const QByteArray &s) : m_size(strlen(s.constData())), m_data(s.constData()) {}
|
||||
|
||||
inline const char *latin1() const { return m_data; }
|
||||
inline int size() const { return m_size; }
|
||||
|
Loading…
Reference in New Issue
Block a user