Use emplace_back instead of push_back (svx)
Change-Id: Icf796bba7f4dbfea17e13225b03d7b5b507317da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161383 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -437,7 +437,7 @@ static void GetTextAreaOutline(
|
||||
aDXArry[a],
|
||||
aFont.GetFontHeight()
|
||||
)));
|
||||
aCharacterData.vOutlines.push_back(tools::PolyPolygon(tools::Polygon(aPolygon)));
|
||||
aCharacterData.vOutlines.emplace_back(tools::Polygon(aPolygon));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -450,7 +450,7 @@ static void GetTextAreaOutline(
|
||||
aDXArry.empty() ? 10 : aDXArry.back(),
|
||||
aFont.GetFontHeight()
|
||||
)));
|
||||
aCharacterData.vOutlines.push_back(tools::PolyPolygon(tools::Polygon(aPolygon)));
|
||||
aCharacterData.vOutlines.emplace_back(tools::Polygon(aPolygon));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -357,7 +357,7 @@ void ClassificationDialog::readRecentlyUsed()
|
||||
}
|
||||
aWalker.parent();
|
||||
|
||||
aResults.push_back({ eType, sString, sAbbreviatedString, sIdentifier });
|
||||
aResults.emplace_back(eType, sString, sAbbreviatedString, sIdentifier);
|
||||
}
|
||||
}
|
||||
aWalker.next();
|
||||
@@ -541,7 +541,7 @@ std::vector<ClassificationResult> ClassificationDialog::getResult()
|
||||
sWeightProperty = "BOLD";
|
||||
// Insert into collection
|
||||
OUString sBlank;
|
||||
aClassificationResults.push_back({ ClassificationType::PARAGRAPH, sWeightProperty, sBlank, sBlank });
|
||||
aClassificationResults.emplace_back(ClassificationType::PARAGRAPH, sWeightProperty, sBlank, sBlank);
|
||||
}
|
||||
|
||||
const SvxFieldItem* pFieldItem = findField(rSection);
|
||||
@@ -554,12 +554,12 @@ std::vector<ClassificationResult> ClassificationDialog::getResult()
|
||||
|
||||
if (pClassificationField)
|
||||
{
|
||||
aClassificationResults.push_back({ pClassificationField->meType, pClassificationField->msFullClassName,
|
||||
pClassificationField->msDescription, pClassificationField->msIdentifier });
|
||||
aClassificationResults.emplace_back(pClassificationField->meType, pClassificationField->msFullClassName,
|
||||
pClassificationField->msDescription, pClassificationField->msIdentifier);
|
||||
}
|
||||
else
|
||||
{
|
||||
aClassificationResults.push_back({ ClassificationType::TEXT, sDisplayString, sDisplayString, OUString() });
|
||||
aClassificationResults.emplace_back(ClassificationType::TEXT, sDisplayString, sDisplayString, OUString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -849,9 +849,9 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const
|
||||
Primitive2DContainer aRetval;
|
||||
for (const auto& xChild : rContentForShadow)
|
||||
{
|
||||
aRetval.push_back(Primitive2DReference(
|
||||
aRetval.emplace_back(
|
||||
new ShadowPrimitive2D(aShadowOffset, rShadow.getColor(), rShadow.getBlur(),
|
||||
Primitive2DContainer({ xChild }))));
|
||||
Primitive2DContainer({ xChild })));
|
||||
if (rShadow.getTransparence() != 0.0)
|
||||
{
|
||||
Primitive2DContainer aTempContent{ aRetval.back() };
|
||||
|
||||
Reference in New Issue
Block a user