From c773b0c7c8239e5d0e196ee6dfdc7dd0606752a5 Mon Sep 17 00:00:00 2001 From: vagin ivan Date: Mon, 3 Oct 2022 17:26:29 +0300 Subject: [PATCH] Remove static PandaString to avoid use of uninitialized allocator Signed-off-by: vagin ivan --- runtime/js_collator.cpp | 2 +- runtime/js_collator.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/js_collator.cpp b/runtime/js_collator.cpp index a39d91e6d..fcda1a6fc 100644 --- a/runtime/js_collator.cpp +++ b/runtime/js_collator.cpp @@ -22,7 +22,7 @@ namespace panda::ecmascript { // NOLINTNEXTLINE (readability-identifier-naming, fuchsia-statically-constructed-objects) -const PandaString JSCollator::uIcuDataColl = U_ICUDATA_NAME U_TREE_SEPARATOR_STRING "coll"; +const std::string JSCollator::uIcuDataColl = U_ICUDATA_NAME U_TREE_SEPARATOR_STRING "coll"; // NOLINTNEXTLINE(fuchsia-statically-constructed-objects) const std::map JSCollator::caseFirstMap = { {"upper", CaseFirstOption::UPPER}, {"lower", CaseFirstOption::LOWER}, {"false", CaseFirstOption::FALSE_OPTION}}; diff --git a/runtime/js_collator.h b/runtime/js_collator.h index ad2fe6531..8494746ea 100644 --- a/runtime/js_collator.h +++ b/runtime/js_collator.h @@ -28,7 +28,7 @@ enum class SensitivityOption : uint8_t { BASE = 0x01, ACCENT, CASE, VARIANT, UND class JSCollator : public JSObject { public: // NOLINTNEXTLINE (readability-identifier-naming, fuchsia-statically-constructed-objects) - static const PandaString uIcuDataColl; + static const std::string uIcuDataColl; static const std::map caseFirstMap; -- Gitee