starmath/source/mathtype.cxx | 3 ++- starmath/source/mathtype.hxx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit a0731f14d1b9c86a626e8560053d87dcaaef8ad6 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue May 24 15:42:21 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed May 25 19:00:26 2022 +0200 std::set->o3tl::sorted_vector in MathTypeFontSet Change-Id: I8b664f10bee232355eeb431de6b1445d9c797f6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 4df34fa1714e..518f29fc5b40 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -45,6 +45,7 @@ void MathType::Init() stored in the document */ MathTypeFont aFont; + aUserStyles.reserve(11); for(sal_uInt8 i=1;i<=11;i++) { aFont.nTface = i+128; @@ -540,7 +541,7 @@ void MathTypeFont::AppendStyleToText(OUString &rRet) void MathType::TypeFaceToString(OUString &rTxt,sal_uInt8 nFace) { MathTypeFont aFont(nFace); - MathTypeFontSet::iterator aItr = aUserStyles.find(aFont); + auto aItr = aUserStyles.find(aFont); if (aItr != aUserStyles.end()) aFont.nStyle = aItr->nStyle; aFont.AppendStyleToText(rTxt); diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx index 4293b1e0608f..cd06cfcddf87 100644 --- a/starmath/source/mathtype.hxx +++ b/starmath/source/mathtype.hxx @@ -21,7 +21,7 @@ #include <node.hxx> -#include <set> +#include <o3tl/sorted_vector.hxx> class SfxMedium; class SotStorage; @@ -46,7 +46,7 @@ struct LessMathTypeFont } }; -typedef ::std::set< MathTypeFont, LessMathTypeFont > MathTypeFontSet; +typedef o3tl::sorted_vector< MathTypeFont, LessMathTypeFont > MathTypeFontSet; class MathType {