diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-03-02 19:10:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-03-08 13:31:54 (GMT) |
commit | 4658413ff3b9551fac67907f296a586e9f2c15ed (patch) | |
tree | 495ea78acb2a9d7463540f9e711530a0d42f3e72 /qtools/qstring.h | |
parent | 6c06e912338176303d1a1e041a39984ff6fd42be (diff) | |
download | Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.zip Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.tar.gz Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.tar.bz2 |
Enabled stricter compiler warnings and fixed all new warnings
Diffstat (limited to 'qtools/qstring.h')
-rw-r--r-- | qtools/qstring.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qtools/qstring.h b/qtools/qstring.h index d459132..293768f 100644 --- a/qtools/qstring.h +++ b/qtools/qstring.h @@ -147,8 +147,8 @@ public: QString decomposition() const; Decomposition decompositionTag() const; - char latin1() const { return rw ? 0 : cl; } - ushort unicode() const { return (rw << 8) | cl; } + char latin1() const { return rw ? 0 : (char)cl; } + ushort unicode() const { return (ushort)((rw << 8) | cl); } #ifndef QT_NO_CAST_ASCII // like all ifdef'd code this is undocumented operator char() const { return latin1(); } @@ -333,7 +333,7 @@ struct Q_EXPORT QStringData : public QShared { QStringData() : unicode(0), ascii(0), len(0), maxl(0), dirtyascii(0) { ref(); } QStringData(QChar *u, uint l, uint m) : - unicode(u), ascii(0), len(l), maxl(m), dirtyascii(0) { } + unicode(u), ascii(0), len(l), maxl(m&0x3FFFFFFF), dirtyascii(0) { } ~QStringData() { if ( unicode ) delete[] ((char*)unicode); if ( ascii ) delete[] ascii; } |