Use emplace_back some more

This commit is contained in:
Martin Kleusberg
2019-05-02 12:05:27 +02:00
parent 59e1edc2ba
commit e16537dd9a
5 changed files with 17 additions and 19 deletions

View File

@@ -2694,11 +2694,10 @@ static void loadBrowseDataTableSettings(BrowseDataTableSettings& settings, QXmlS
int index = xml.attributes().value("index").toInt();
while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "column") {
if(xml.name() == "format") {
CondFormat newCondFormat(xml.attributes().value("condition").toString(),
QColor(xml.attributes().value("foreground").toString()),
QColor(xml.attributes().value("background").toString()),
settings.encoding);
settings.condFormats[index].push_back(newCondFormat);
settings.condFormats[index].emplace_back(xml.attributes().value("condition").toString(),
QColor(xml.attributes().value("foreground").toString()),
QColor(xml.attributes().value("background").toString()),
settings.encoding);
xml.skipCurrentElement();
}
}