You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
[TextServer] Ensure ICU data is initialised only one and cleaned only at exit.
This commit is contained in:
@@ -334,6 +334,8 @@ _FORCE_INLINE_ bool is_connected_to_prev(char32_t p_chr, char32_t p_pchr) {
|
|||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
bool TextServerAdvanced::icu_data_loaded = false;
|
||||||
|
|
||||||
bool TextServerAdvanced::_has_feature(Feature p_feature) const {
|
bool TextServerAdvanced::_has_feature(Feature p_feature) const {
|
||||||
switch (p_feature) {
|
switch (p_feature) {
|
||||||
case FEATURE_SIMPLE_LAYOUT:
|
case FEATURE_SIMPLE_LAYOUT:
|
||||||
@@ -6599,5 +6601,6 @@ TextServerAdvanced::~TextServerAdvanced() {
|
|||||||
uset_close(allowed);
|
uset_close(allowed);
|
||||||
allowed = nullptr;
|
allowed = nullptr;
|
||||||
}
|
}
|
||||||
u_cleanup();
|
|
||||||
|
std::atexit(u_cleanup);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class TextServerAdvanced : public TextServerExtension {
|
|||||||
|
|
||||||
// ICU support data.
|
// ICU support data.
|
||||||
|
|
||||||
bool icu_data_loaded = false;
|
static bool icu_data_loaded;
|
||||||
mutable USet *allowed = nullptr;
|
mutable USet *allowed = nullptr;
|
||||||
mutable USpoofChecker *sc_spoof = nullptr;
|
mutable USpoofChecker *sc_spoof = nullptr;
|
||||||
mutable USpoofChecker *sc_conf = nullptr;
|
mutable USpoofChecker *sc_conf = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user