Commit 65753b5a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent ce24bff5
...@@ -61,49 +61,56 @@ void TeeHtmlWriter::addHtmlWriter(HtmlWriter *writer) ...@@ -61,49 +61,56 @@ void TeeHtmlWriter::addHtmlWriter(HtmlWriter *writer)
void TeeHtmlWriter::begin(const QString &css) void TeeHtmlWriter::begin(const QString &css)
{ {
for (QList<HtmlWriter *>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it) { QList<HtmlWriter *>::const_iterator end(mWriters.constEnd());
for (QList<HtmlWriter *>::const_iterator it = mWriters.constBegin(); it != end; ++it) {
(*it)->begin(css); (*it)->begin(css);
} }
} }
void TeeHtmlWriter::end() void TeeHtmlWriter::end()
{ {
for (QList<HtmlWriter *>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it) { QList<HtmlWriter *>::const_iterator end(mWriters.constEnd());
for (QList<HtmlWriter *>::const_iterator it = mWriters.constBegin(); it != end; ++it) {
(*it)->end(); (*it)->end();
} }
} }
void TeeHtmlWriter::reset() void TeeHtmlWriter::reset()
{ {
for (QList<HtmlWriter *>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it) { QList<HtmlWriter *>::const_iterator end(mWriters.constEnd());
for (QList<HtmlWriter *>::const_iterator it = mWriters.constBegin(); it != end; ++it) {
(*it)->reset(); (*it)->reset();
} }
} }
void TeeHtmlWriter::write(const QString &str) void TeeHtmlWriter::write(const QString &str)
{ {
for (QList<HtmlWriter *>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it) { QList<HtmlWriter *>::const_iterator end(mWriters.constEnd());
for (QList<HtmlWriter *>::const_iterator it = mWriters.constBegin(); it != end; ++it) {
(*it)->write(str); (*it)->write(str);
} }
} }
void TeeHtmlWriter::queue(const QString &str) void TeeHtmlWriter::queue(const QString &str)
{ {
for (QList<HtmlWriter *>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it) { QList<HtmlWriter *>::const_iterator end(mWriters.constEnd());
for (QList<HtmlWriter *>::const_iterator it = mWriters.constBegin(); it != end; ++it) {
(*it)->queue(str); (*it)->queue(str);
} }
} }
void TeeHtmlWriter::flush() void TeeHtmlWriter::flush()
{ {
for (QList<HtmlWriter *>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it) { QList<HtmlWriter *>::const_iterator end(mWriters.constEnd());
for (QList<HtmlWriter *>::const_iterator it = mWriters.constBegin(); it != end; ++it) {
(*it)->flush(); (*it)->flush();
} }
} }
void TeeHtmlWriter::embedPart(const QByteArray &contentId, const QString &url) void TeeHtmlWriter::embedPart(const QByteArray &contentId, const QString &url)
{ {
for (QList<HtmlWriter *>::Iterator it = mWriters.begin(); it != mWriters.end(); ++it) { QList<HtmlWriter *>::const_iterator end(mWriters.constEnd());
for (QList<HtmlWriter *>::const_iterator it = mWriters.constBegin(); it != end; ++it) {
(*it)->embedPart(contentId, url); (*it)->embedPart(contentId, url);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment