ICU-2699 Fix some compiler warnings

X-SVN-Rev: 12177
This commit is contained in:
George Rhoten 2003-05-29 22:21:22 +00:00
parent a39ab1fa69
commit cf258a7833
5 changed files with 72 additions and 72 deletions

View File

@ -157,12 +157,12 @@ class U_COMMON_API LocaleKey : public ICUServiceKey {
/**
* UObject boilerplate.
*/
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
static UClassID getStaticClassID() {
return (UClassID)&fgClassID;
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
}
#ifdef SERVICE_DEBUG
@ -278,12 +278,12 @@ protected:
/**
* UObject boilerplate.
*/
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
static UClassID getStaticClassID() {
return (UClassID)&fgClassID;
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
}
#ifdef SERVICE_DEBUG
@ -348,12 +348,12 @@ class U_COMMON_API SimpleLocaleKeyFactory : public LocaleKeyFactory {
/**
* UObject boilerplate.
*/
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
static UClassID getStaticClassID() {
return (UClassID)&fgClassID;
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
}
#ifdef SERVICE_DEBUG

View File

@ -36,12 +36,12 @@ class U_COMMON_API EventListener : public UObject {
virtual ~EventListener() {}
public:
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
static UClassID getStaticClassID() {
return (UClassID)&fgClassID;
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
}
public:

View File

@ -187,15 +187,15 @@ class U_COMMON_API ICUServiceKey : public UObject {
/**
* UObject RTTI boilerplate.
*/
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
/**
* UObject RTTI boilerplate.
*/
static UClassID getStaticClassID() {
return (UClassID)&fgClassID;
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
}
#ifdef SERVICE_DEBUG
@ -347,15 +347,15 @@ class U_COMMON_API SimpleFactory : public ICUServiceFactory {
/**
* UObject RTTI boilerplate.
*/
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
/**
* UObject RTTI boilerplate.
*/
static UClassID getStaticClassID() {
return (UClassID)&fgClassID;
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
}
#ifdef SERVICE_DEBUG
@ -380,33 +380,33 @@ class U_COMMON_API SimpleFactory : public ICUServiceFactory {
* acceptsListener and notifyListener as appropriate.</p>
*/
class U_COMMON_API ServiceListener : public EventListener {
public:
/**
* <p>This method is called when the service changes. At the time of the
* call this listener is registered with the service. It must
* not modify the notifier in the context of this call.</p>
*
* @param service the service that changed.
*/
virtual void serviceChanged(const ICUService& service) const = 0;
public:
/**
* UObject RTTI boilerplate.
*/
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
}
/**
* UObject RTTI boilerplate.
*/
static UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
private:
static const char fgClassID;
public:
/**
* <p>This method is called when the service changes. At the time of the
* call this listener is registered with the service. It must
* not modify the notifier in the context of this call.</p>
*
* @param service the service that changed.
*/
virtual void serviceChanged(const ICUService& service) const = 0;
public:
/**
* UObject RTTI boilerplate.
*/
static inline UClassID getStaticClassID() {
return (UClassID)&fgClassID;
}
/**
* UObject RTTI boilerplate.
*/
virtual UClassID getDynamicClassID() const {
return getStaticClassID();
}
private:
static const char fgClassID;
};
/*

View File

@ -60,13 +60,6 @@ public :
virtual inline UBool isNotProhibited(UChar32 ch);
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @draft ICU 2.6
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
@ -74,6 +67,13 @@ public :
*/
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @draft ICU 2.6
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
private:
/**
* The address of this static class variable serves as this class's ID

View File

@ -245,13 +245,6 @@ public:
*/
void sortedInsert(int32_t obj, USortComparator *compare, UErrorCode& ec);
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @draft ICU 2.2
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
@ -259,6 +252,13 @@ public:
*/
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @draft ICU 2.2
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
private:
void _init(int32_t initialCapacity, UErrorCode &status);
@ -325,13 +325,6 @@ public:
int32_t search(void* obj) const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @draft ICU 2.2
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
@ -339,6 +332,13 @@ public:
*/
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @draft ICU 2.2
*/
virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
private:
// Disallow
UStack(const UStack&);