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 /src/rtfgen.cpp | |
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 'src/rtfgen.cpp')
-rw-r--r-- | src/rtfgen.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 39741dc..221b44c 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -273,15 +273,14 @@ void RTFGenerator::beginRTFDocument() // sort styles ascending by \s-number via an intermediate QArray QDictIterator<StyleData> iter(rtf_Style); - const StyleData* style; + const StyleData* style = 0; unsigned maxIndex = 0; for(; (style = iter.current()); ++iter) { unsigned index = style->index; if (maxIndex < index) maxIndex = index; } - QArray<const StyleData*> array(maxIndex + 1); - array.fill(0); + std::vector<const StyleData*> array(maxIndex + 1, 0); ASSERT(maxIndex < array.size()); iter.toFirst(); @@ -297,10 +296,10 @@ void RTFGenerator::beginRTFDocument() } // write array elements - unsigned size = array.size(); - for(unsigned i = 0; i < size; i++) + size_t size = array.size(); + for(size_t i = 0; i < size; i++) { - const StyleData* style = array.at(i); + style = array.at(i); if (style != 0) t <<"{" << style->reference << style->definition << ";}\n"; } @@ -2463,7 +2462,7 @@ static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncl { // null terminate at the last '}' //char *str = strrchr(buffer,'}'); - int pos = lineBuf.findRev('}'); + pos = lineBuf.findRev('}'); if (pos != -1) lineBuf.at(pos) = '\0'; |