mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 17:01:16 +00:00
ICU-10461 Andy's review comments.
X-SVN-Rev: 35490
This commit is contained in:
parent
283c817edb
commit
e4f7eafc89
5 changed files with 19 additions and 19 deletions
icu4c/source
|
@ -80,8 +80,8 @@ const SharedObject *LRUCache::_get(const char *localeId, UErrorCode &status) {
|
|||
if (U_FAILURE(status)) {
|
||||
return NULL;
|
||||
}
|
||||
CacheEntry *entry = (CacheEntry *) uhash_get(
|
||||
localeIdToEntries, localeId);
|
||||
CacheEntry *entry = static_cast<CacheEntry *>(uhash_get(
|
||||
localeIdToEntries, localeId));
|
||||
if (entry == NULL) {
|
||||
// Its a cache miss.
|
||||
|
||||
|
|
|
@ -1046,7 +1046,7 @@ NumberFormat::createInstance(const Locale& loc, UNumberFormatStyle kind, UErrorC
|
|||
if (U_FAILURE(status)) {
|
||||
return NULL;
|
||||
}
|
||||
NumberFormat *result = (NumberFormat *) (*shared)->clone();
|
||||
NumberFormat *result = static_cast<NumberFormat *>((*shared)->clone());
|
||||
shared->removeRef();
|
||||
if (result == NULL) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
|
|
|
@ -19,15 +19,15 @@ class NumberFormat;
|
|||
|
||||
class U_I18N_API SharedNumberFormat : public SharedObject {
|
||||
public:
|
||||
SharedNumberFormat(NumberFormat *nfToAdopt) : ptr(nfToAdopt) { }
|
||||
virtual ~SharedNumberFormat();
|
||||
const NumberFormat *get() const { return ptr; }
|
||||
const NumberFormat *operator->() const { return ptr; }
|
||||
const NumberFormat &operator*() const { return *ptr; }
|
||||
SharedNumberFormat(NumberFormat *nfToAdopt) : ptr(nfToAdopt) { }
|
||||
virtual ~SharedNumberFormat();
|
||||
const NumberFormat *get() const { return ptr; }
|
||||
const NumberFormat *operator->() const { return ptr; }
|
||||
const NumberFormat &operator*() const { return *ptr; }
|
||||
private:
|
||||
NumberFormat *ptr;
|
||||
SharedNumberFormat(const SharedNumberFormat &);
|
||||
SharedNumberFormat &operator=(const SharedNumberFormat &);
|
||||
NumberFormat *ptr;
|
||||
SharedNumberFormat(const SharedNumberFormat &);
|
||||
SharedNumberFormat &operator=(const SharedNumberFormat &);
|
||||
};
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
|
|
@ -19,14 +19,14 @@ class PluralRules;
|
|||
|
||||
class U_I18N_API SharedPluralRules : public SharedObject {
|
||||
public:
|
||||
SharedPluralRules(PluralRules *prToAdopt) : ptr(prToAdopt) { }
|
||||
virtual ~SharedPluralRules();
|
||||
const PluralRules *operator->() const { return ptr; }
|
||||
const PluralRules &operator*() const { return *ptr; }
|
||||
SharedPluralRules(PluralRules *prToAdopt) : ptr(prToAdopt) { }
|
||||
virtual ~SharedPluralRules();
|
||||
const PluralRules *operator->() const { return ptr; }
|
||||
const PluralRules &operator*() const { return *ptr; }
|
||||
private:
|
||||
PluralRules *ptr;
|
||||
SharedPluralRules(const SharedPluralRules &);
|
||||
SharedPluralRules &operator=(const SharedPluralRules &);
|
||||
PluralRules *ptr;
|
||||
SharedPluralRules(const SharedPluralRules &);
|
||||
SharedPluralRules &operator=(const SharedPluralRules &);
|
||||
};
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
|
|
@ -308,7 +308,7 @@ public:
|
|||
|
||||
/**
|
||||
* For ICU use only.
|
||||
* Returns handle to the shared, cached PluralRules isntance.
|
||||
* Returns handle to the shared, cached PluralRules instance.
|
||||
* Caller must call removeRef() on returned value once it is done with
|
||||
* the shared instance.
|
||||
* @internal
|
||||
|
|
Loading…
Add table
Reference in a new issue