summaryrefslogtreecommitdiffstats
path: root/src/rtfgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-03-02 19:10:51 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-03-08 13:31:54 (GMT)
commit4658413ff3b9551fac67907f296a586e9f2c15ed (patch)
tree495ea78acb2a9d7463540f9e711530a0d42f3e72 /src/rtfgen.cpp
parent6c06e912338176303d1a1e041a39984ff6fd42be (diff)
downloadDoxygen-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.cpp13
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';