godot/thirdparty/icu4c/common/localeprioritylist.cpp

// © 2019 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html

// localeprioritylist.cpp
// created: 2019jul11 Markus W. Scherer

#include "unicode/utypes.h"
#include "unicode/localpointer.h"
#include "unicode/locid.h"
#include "unicode/stringpiece.h"
#include "unicode/uobject.h"
#include "charstr.h"
#include "cmemory.h"
#include "localeprioritylist.h"
#include "uarrsort.h"
#include "uassert.h"
#include "uhash.h"

U_NAMESPACE_BEGIN

namespace {

int32_t hashLocale(const UHashTok token) {}

UBool compareLocales(const UHashTok t1, const UHashTok t2) {}

constexpr int32_t WEIGHT_ONE =;

struct LocaleAndWeight {};

int32_t U_CALLCONV
compareLocaleAndWeight(const void * /*context*/, const void *left, const void *right) {}

const char *skipSpaces(const char *p, const char *limit) {}

int32_t findTagLength(const char *p, const char *limit) {}

/**
 * Parses and returns a qvalue weight in millis.
 * Advances p to after the parsed substring.
 * Returns a negative value if parsing fails.
 */
int32_t parseWeight(const char *&p, const char *limit) {}

}  // namespace

/**
 * Nothing but a wrapper over a MaybeStackArray of LocaleAndWeight.
 *
 * This wrapper exists (and is not in an anonymous namespace)
 * so that we can forward-declare it in the header file and
 * don't have to expose the MaybeStackArray specialization and
 * the LocaleAndWeight to code (like the test) that #includes localeprioritylist.h.
 * Also, otherwise we would have to do a platform-specific
 * template export declaration of some kind for the MaybeStackArray specialization
 * to be properly exported from the common DLL.
 */
struct LocaleAndWeightArray : public UMemory {};

LocalePriorityList::LocalePriorityList(StringPiece s, UErrorCode &errorCode) {}

LocalePriorityList::~LocalePriorityList() {}

const Locale *LocalePriorityList::localeAt(int32_t i) const {}

Locale *LocalePriorityList::orphanLocaleAt(int32_t i) {}

bool LocalePriorityList::add(const Locale &locale, int32_t weight, UErrorCode &errorCode) {}

void LocalePriorityList::sort(UErrorCode &errorCode) {}

U_NAMESPACE_END