summaryrefslogtreecommitdiff
path: root/sal/textenc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-30 20:54:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-31 08:55:29 +0200
commita943936eeff04b60ebd0b2552bc18b42606f3321 (patch)
treee3a20ebf81feaa0914e9e5b9a0fe008e0ea61c2e /sal/textenc
parent620f9649ae55e01700419876ce25ab4e45ed859f (diff)
rtl::Static -> static local
in a handful cases, like a map or a vector, we don't need init on demand at all, the default constructor can be laid out at compile time Change-Id: Ifa3188af7a65cd475ce0f603d15a8c26bcda7e6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/textenc')
-rw-r--r--sal/textenc/textenc.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sal/textenc/textenc.cxx b/sal/textenc/textenc.cxx
index b0856f9add1c..1d7279f849a4 100644
--- a/sal/textenc/textenc.cxx
+++ b/sal/textenc/textenc.cxx
@@ -27,7 +27,6 @@
#include <cstdlib>
#include <osl/module.hxx>
-#include <rtl/instance.hxx>
#include <rtl/textenc.h>
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
@@ -409,10 +408,6 @@ private:
#endif
-struct FullTextEncodingDataSingleton:
- public rtl::Static< FullTextEncodingData, FullTextEncodingDataSingleton >
-{};
-
}
ImplTextEncodingData const *
@@ -431,7 +426,10 @@ Impl_getTextEncodingData(rtl_TextEncoding nEncoding)
case RTL_TEXTENCODING_ISO_8859_1:
return &aImplISO88591TextEncodingData; break;
default:
- return FullTextEncodingDataSingleton::get().get(nEncoding);
+ {
+ static FullTextEncodingData gFullTextEncodingData;
+ return gFullTextEncodingData.get(nEncoding);
+ }
}
}