From 5e55c6c611977e2d948b5b0776e8df710e7da9c5 Mon Sep 17 00:00:00 2001
From: bruvzg <7645683+bruvzg@users.noreply.github.com>
Date: Wed, 1 Nov 2023 08:56:12 +0200
Subject: ICU4C: Update to version 74.1

---
 thirdparty/icu4c/common/lsr.cpp | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

(limited to 'thirdparty/icu4c/common/lsr.cpp')

diff --git a/thirdparty/icu4c/common/lsr.cpp b/thirdparty/icu4c/common/lsr.cpp
index 39eb46df27..bd231ecdb5 100644
--- a/thirdparty/icu4c/common/lsr.cpp
+++ b/thirdparty/icu4c/common/lsr.cpp
@@ -31,6 +31,26 @@ LSR::LSR(char prefix, const char *lang, const char *scr, const char *r, int32_t
     }
 }
 
+LSR::LSR(StringPiece lang, StringPiece scr, StringPiece r, int32_t f,
+         UErrorCode &errorCode) :
+        language(nullptr), script(nullptr), region(nullptr),
+        regionIndex(indexForRegion(r.data())), flags(f) {
+    if (U_SUCCESS(errorCode)) {
+        CharString data;
+        data.append(lang, errorCode).append('\0', errorCode);
+        int32_t scriptOffset = data.length();
+        data.append(scr, errorCode).append('\0', errorCode);
+        int32_t regionOffset = data.length();
+        data.append(r, errorCode);
+        owned = data.cloneData(errorCode);
+        if (U_SUCCESS(errorCode)) {
+            language = owned;
+            script = owned + scriptOffset;
+            region = owned + regionOffset;
+        }
+    }
+}
+
 LSR::LSR(LSR &&other) noexcept :
         language(other.language), script(other.script), region(other.region), owned(other.owned),
         regionIndex(other.regionIndex), flags(other.flags),
-- 
cgit v1.2.3