const annotations for getPreferencesFor() and thus getAlias()

This commit is contained in:
Hugo van der Merwe 2020-05-06 15:20:23 +02:00
parent aeccdbf85c
commit 911a3cdc32
3 changed files with 3 additions and 3 deletions

View file

@ -775,7 +775,7 @@ public:
return this->fCount;
}
T** getAlias() {
T** getAlias() const {
return this->fPool.getAlias();
}

View file

@ -362,7 +362,7 @@ U_I18N_API UnitPreferences::UnitPreferences(UErrorCode &status) {
// TODO/WIP: create a simpler class to replace `UnitPreference **&outPrefrences`.
void U_I18N_API UnitPreferences::getPreferencesFor(const char *category, const char *usage,
const char *region, UnitPreference **&outPreferences,
int32_t &preferenceCount, UErrorCode &status) {
int32_t &preferenceCount, UErrorCode &status) const {
int32_t idx = getPreferenceMetadataIndex(&metadata_, category, usage, region, status);
if (U_FAILURE(status)) { return; }
U_ASSERT(idx >= 0); // Failures should have been taken care of by `status`.

View file

@ -155,7 +155,7 @@ class U_I18N_API UnitPreferences {
*/
void getPreferencesFor(const char *category, const char *usage, const char *region,
UnitPreference **&outPreferences, int32_t &preferenceCount,
UErrorCode &status);
UErrorCode &status) const;
protected:
// Metadata about the sets of preferences, this is the index for looking up