ICU-3500 Fix compiler warnings about multiple virtual destructors and/or not inlining compiler generated destructors.

X-SVN-Rev: 14896
This commit is contained in:
George Rhoten 2004-04-07 05:20:22 +00:00
parent f9553c4f23
commit 232ee12872
8 changed files with 40 additions and 6 deletions

View File

@ -186,6 +186,8 @@ LocaleKey::LocaleKey(const UnicodeString& primaryID,
_currentID = _primaryID;
}
LocaleKey::~LocaleKey() {}
UnicodeString&
LocaleKey::prefix(UnicodeString& result) const {
if (_kind != KIND_ANY) {
@ -518,6 +520,8 @@ ICUResourceBundleFactory::ICUResourceBundleFactory(const UnicodeString& bundleNa
{
}
ICUResourceBundleFactory::~ICUResourceBundleFactory() {}
const Hashtable*
ICUResourceBundleFactory::getSupportedIDs(UErrorCode& status) const
{

View File

@ -75,16 +75,16 @@ class U_COMMON_API LocaleKey : public ICUServiceKey {
*/
static LocaleKey* createWithCanonicalFallback(const UnicodeString* primaryID,
const UnicodeString* canonicalFallbackID,
UErrorCode& status);
UErrorCode& status);
/**
* Create a LocaleKey with canonical primary and fallback IDs.
*/
static LocaleKey* createWithCanonicalFallback(const UnicodeString* primaryID,
const UnicodeString* canonicalFallbackID,
int32_t kind,
UErrorCode& status);
UErrorCode& status);
protected:
/**
* PrimaryID is the user's requested locale string,
@ -158,6 +158,11 @@ class U_COMMON_API LocaleKey : public ICUServiceKey {
virtual UClassID getDynamicClassID() const;
/**
* Destructor.
*/
virtual ~LocaleKey();
#ifdef SERVICE_DEBUG
public:
virtual UnicodeString& debug(UnicodeString& result) const;
@ -373,6 +378,11 @@ class U_COMMON_API ICUResourceBundleFactory : public LocaleKeyFactory
*/
ICUResourceBundleFactory(const UnicodeString& bundleName);
/**
* Destructor
*/
virtual ~ICUResourceBundleFactory();
protected:
/**
* Return the supported IDs. This is the set of all locale names in ICULocaleData.

View File

@ -488,6 +488,8 @@ UStack::UStack(UObjectDeleter *d, UKeyComparator *c, int32_t initialCapacity, UE
{
}
UStack::~UStack() {}
void* UStack::pop(void) {
int32_t n = size() - 1;
void* result = 0;

View File

@ -115,7 +115,7 @@ public:
UVector(UObjectDeleter *d, UKeyComparator *c, int32_t initialCapacity, UErrorCode &status);
~UVector();
virtual ~UVector();
/**
* Assign this object to another (make this a copy of 'other').
@ -301,6 +301,8 @@ public:
UStack(UObjectDeleter *d, UKeyComparator *c, int32_t initialCapacity, UErrorCode &status);
virtual ~UStack();
// It's okay not to have a virtual destructor (in UVector)
// because UStack has no special cleanup to do.

View File

@ -57,6 +57,10 @@ U_NAMESPACE_BEGIN
//-------------------------------------------
CollatorFactory::~CollatorFactory() {}
//-------------------------------------------
UBool
CollatorFactory::visible(void) const {
return TRUE;

View File

@ -90,6 +90,7 @@ const UChar * const NumberFormat::fgLastResortNumberPatterns[] =
// -------------------------------------
// default constructor
SimpleNumberFormatFactory::~SimpleNumberFormatFactory() {}
NumberFormat::NumberFormat()
: fGroupingUsed(TRUE),

View File

@ -919,12 +919,18 @@ private:
class U_I18N_API CollatorFactory : public UObject {
public:
/**
* Destructor
* @draft ICU 3.0
*/
virtual ~CollatorFactory();
/**
* Return true if this factory is visible. Default is true.
* If not visible, the locales supported by this factory will not
* be listed by getAvailableLocales.
* @return true if the factory is visible.
@draft ICU 2.6
* @draft ICU 2.6
*/
virtual UBool visible(void) const;

View File

@ -785,6 +785,11 @@ public:
{
}
/**
* @draft ICU 3.0
*/
~SimpleNumberFormatFactory();
/**
* @draft ICU 2.6
*/