Commit 9d6b00d7 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 8a7863b2
......@@ -158,8 +158,8 @@ QVector<PluginEditor *> PluginEditorManagerPrivate::pluginsList() const
QVector<PluginEditor *> lst;
QVector<PluginEditorInfo>::ConstIterator end(mPluginList.constEnd());
for (QVector<PluginEditorInfo>::ConstIterator it = mPluginList.constBegin(); it != end; ++it) {
if ((*it).plugin) {
lst << (*it).plugin;
if (auto plugin = (*it).plugin) {
lst << plugin;
}
}
return lst;
......
......@@ -162,8 +162,8 @@ QVector<PluginEditorCheckBeforeSend *> PluginEditorCheckBeforeSendManagerPrivate
QVector<PluginEditorCheckBeforeSend *> lst;
QVector<PluginEditorCheckBeforeSendInfo>::ConstIterator end(mPluginList.constEnd());
for (QVector<PluginEditorCheckBeforeSendInfo>::ConstIterator it = mPluginList.constBegin(); it != end; ++it) {
if ((*it).plugin) {
lst << (*it).plugin;
if (auto plugin = (*it).plugin) {
lst << plugin;
}
}
return lst;
......
......@@ -163,8 +163,8 @@ QVector<PluginEditorInit *> PluginEditorInitManagerPrivate::pluginsList() const
QVector<PluginEditorInit *> lst;
QVector<PluginEditorInitInfo>::ConstIterator end(mPluginList.constEnd());
for (QVector<PluginEditorInitInfo>::ConstIterator it = mPluginList.constBegin(); it != end; ++it) {
if ((*it).plugin) {
lst << (*it).plugin;
if (auto plugin = (*it).plugin) {
lst << plugin;
}
}
return lst;
......
......@@ -169,8 +169,8 @@ QVector<MessageViewer::HeaderStylePlugin *> HeaderStylePluginManagerPrivate::plu
QVector<MessageViewer::HeaderStylePlugin *> lst;
QVector<HeaderStylePluginInfo>::ConstIterator end(mPluginList.constEnd());
for (QVector<HeaderStylePluginInfo>::ConstIterator it = mPluginList.constBegin(); it != end; ++it) {
if ((*it).plugin) {
lst << (*it).plugin;
if (auto plugin = (*it).plugin) {
lst << plugin;
}
}
return lst;
......
......@@ -179,8 +179,8 @@ QVector<ViewerPlugin *> ViewerPluginManagerPrivate::pluginsList() const
QVector<MessageViewer::ViewerPlugin *> lst;
QVector<ViewerPluginInfo>::ConstIterator end(mPluginList.constEnd());
for (QVector<ViewerPluginInfo>::ConstIterator it = mPluginList.constBegin(); it != end; ++it) {
if ((*it).plugin) {
lst << (*it).plugin;
if (auto plugin = (*it).plugin) {
lst << plugin;
}
}
return lst;
......
......@@ -156,8 +156,8 @@ QVector<WebEngineViewer::NetworkPluginUrlInterceptor *> NetworkUrlInterceptorPlu
QVector<WebEngineViewer::NetworkPluginUrlInterceptor *> lst;
QVector<MailNetworkUrlInterceptorPluginInfo>::ConstIterator end(mPluginList.constEnd());
for (QVector<MailNetworkUrlInterceptorPluginInfo>::ConstIterator it = mPluginList.constBegin(); it != end; ++it) {
if ((*it).plugin) {
lst << (*it).plugin;
if (auto plugin = (*it).plugin) {
lst << plugin;
}
}
return lst;
......
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