mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-5349 Use UMTX_CHECK
X-SVN-Rev: 20690
This commit is contained in:
parent
fb89595684
commit
668854033c
1 changed files with 2 additions and 3 deletions
|
@ -955,9 +955,8 @@ const Locale* U_EXPORT2
|
|||
Locale::getAvailableLocales(int32_t& count)
|
||||
{
|
||||
// for now, there is a hardcoded list, so just walk through that list and set it up.
|
||||
umtx_lock(NULL);
|
||||
UBool needInit = availableLocaleList == 0;
|
||||
umtx_unlock(NULL);
|
||||
UBool needInit;
|
||||
UMTX_CHECK(NULL, availableLocaleList == NULL, needInit);
|
||||
|
||||
if (needInit) {
|
||||
int32_t locCount = uloc_countAvailable();
|
||||
|
|
Loading…
Add table
Reference in a new issue