summaryrefslogtreecommitdiff
path: root/icu4c/source/common/unicode/localematcher.h
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-30 21:45:51 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-30 21:45:51 +0000
commit5cbeb59475d2d25a86ac936e47c99be86e0a3183 (patch)
treeb84cfa6aa252b33d133ceb0922061367ca5ac637 /icu4c/source/common/unicode/localematcher.h
parenteb3451793aaf42870e44281708ccac51c010e837 (diff)
parent627758a905bdac685d065ed3de08e628b03b70b4 (diff)
downloadicu-5cbeb59475d2d25a86ac936e47c99be86e0a3183.tar.gz
Snap for 11784721 from 627758a905bdac685d065ed3de08e628b03b70b4 to build-tools-release
Change-Id: I48be0d30274e0df643635f86bc40c5a9de1e52ad
Diffstat (limited to 'icu4c/source/common/unicode/localematcher.h')
-rw-r--r--icu4c/source/common/unicode/localematcher.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/icu4c/source/common/unicode/localematcher.h b/icu4c/source/common/unicode/localematcher.h
index 603daf723..e16f1a31c 100644
--- a/icu4c/source/common/unicode/localematcher.h
+++ b/icu4c/source/common/unicode/localematcher.h
@@ -11,6 +11,8 @@
#if U_SHOW_CPLUSPLUS_API
+#include <optional>
+
#include "unicode/locid.h"
#include "unicode/stringpiece.h"
#include "unicode/uobject.h"
@@ -133,10 +135,10 @@ U_NAMESPACE_BEGIN
struct LSR;
+class LikelySubtags;
class LocaleDistance;
class LocaleLsrIterator;
class UVector;
-class XLikelySubtags;
/**
* Immutable class that picks the best match between a user's desired locales and
@@ -678,9 +680,9 @@ private:
int32_t putIfAbsent(const LSR &lsr, int32_t i, int32_t suppLength, UErrorCode &errorCode);
- int32_t getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remainingIter, UErrorCode &errorCode) const;
+ std::optional<int32_t> getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remainingIter, UErrorCode &errorCode) const;
- const XLikelySubtags &likelySubtags;
+ const LikelySubtags &likelySubtags;
const LocaleDistance &localeDistance;
int32_t thresholdDistance;
int32_t demotionPerDesiredLocale;