diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-10 20:53:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-11 10:54:22 +0200 |
commit | 5ef182586ae2019fa6f6a59dae1b41b2225665bf (patch) | |
tree | f531a471ddec271e9bb5694d917e034cb7d86770 /i18npool/inc | |
parent | da40449dc5f1841ac3e6f6aa1194834a363455b6 (diff) |
no need to allocate the lookupTableItem separately
Change-Id: I43919a002df01c6329ee483bf69f04669cdce1f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/inc')
-rw-r--r-- | i18npool/inc/characterclassificationImpl.hxx | 5 | ||||
-rw-r--r-- | i18npool/inc/collatorImpl.hxx | 5 | ||||
-rw-r--r-- | i18npool/inc/inputsequencechecker.hxx | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx index 34723ef74123..4e03a54fd3be 100644 --- a/i18npool/inc/characterclassificationImpl.hxx +++ b/i18npool/inc/characterclassificationImpl.hxx @@ -23,6 +23,7 @@ #include <cppuhelper/implbase.hxx> #include <vector> #include <memory> +#include <optional> #include <com/sun/star/lang/XServiceInfo.hpp> namespace com::sun::star::uno { class XComponentContext; } @@ -81,8 +82,8 @@ private: aLocale.Variant == rLocale.Variant; }; }; - std::vector<std::unique_ptr<lookupTableItem>> lookupTable; - lookupTableItem *cachedItem; + std::vector<lookupTableItem> lookupTable; + std::optional<lookupTableItem> cachedItem; css::uno::Reference < css::uno::XComponentContext > m_xContext; css::uno::Reference < XCharacterClassification > xUCI; diff --git a/i18npool/inc/collatorImpl.hxx b/i18npool/inc/collatorImpl.hxx index 14a4489a256a..c1068638d8bc 100644 --- a/i18npool/inc/collatorImpl.hxx +++ b/i18npool/inc/collatorImpl.hxx @@ -27,6 +27,7 @@ #include <vector> #include <memory> +#include <optional> namespace com::sun::star::i18n { class XLocaleData5; } namespace com::sun::star::uno { class XComponentContext; } @@ -89,8 +90,8 @@ private: algorithm == _algorithm; } }; - std::vector<std::unique_ptr<lookupTableItem>> lookupTable; - lookupTableItem * cachedItem; + std::vector<lookupTableItem> lookupTable; + std::optional<lookupTableItem> cachedItem; // Service Factory css::uno::Reference < css::uno::XComponentContext > m_xContext; diff --git a/i18npool/inc/inputsequencechecker.hxx b/i18npool/inc/inputsequencechecker.hxx index 52963b3be171..eff426f5caa3 100644 --- a/i18npool/inc/inputsequencechecker.hxx +++ b/i18npool/inc/inputsequencechecker.hxx @@ -25,6 +25,7 @@ #include <vector> #include <memory> +#include <optional> namespace com::sun::star::uno { class XComponentContext; } @@ -63,8 +64,8 @@ private: const char* aLanguage; css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > xISC; }; - std::vector<std::unique_ptr<lookupTableItem>> lookupTable; - lookupTableItem *cachedItem; + std::vector<lookupTableItem> lookupTable; + std::optional<lookupTableItem> cachedItem; css::uno::Reference < css::uno::XComponentContext > m_xContext; |