ICU-20783 C++ covariant return types: clone(), freeze() & friends
diff --git a/icu4c/source/common/filteredbrk.cpp b/icu4c/source/common/filteredbrk.cpp
index 20c3aa8..c07128c 100644
--- a/icu4c/source/common/filteredbrk.cpp
+++ b/icu4c/source/common/filteredbrk.cpp
@@ -173,7 +173,7 @@
status = U_SAFECLONE_ALLOCATED_WARNING;
return clone();
}
- virtual BreakIterator* clone(void) const { return new SimpleFilteredSentenceBreakIterator(*this); }
+ virtual SimpleFilteredSentenceBreakIterator* clone() const { return new SimpleFilteredSentenceBreakIterator(*this); }
virtual UClassID getDynamicClassID(void) const { return NULL; }
virtual UBool operator==(const BreakIterator& o) const { if(this==&o) return true; return false; }
diff --git a/icu4c/source/common/rbbi.cpp b/icu4c/source/common/rbbi.cpp
index 625fe99..01dae48 100644
--- a/icu4c/source/common/rbbi.cpp
+++ b/icu4c/source/common/rbbi.cpp
@@ -323,8 +323,8 @@
// Virtual function: does the right thing with subclasses.
//
//-----------------------------------------------------------------------------
-BreakIterator*
-RuleBasedBreakIterator::clone(void) const {
+RuleBasedBreakIterator*
+RuleBasedBreakIterator::clone() const {
return new RuleBasedBreakIterator(*this);
}
@@ -1079,10 +1079,8 @@
}
-BreakIterator * RuleBasedBreakIterator::createBufferClone(void * /*stackBuffer*/,
- int32_t &bufferSize,
- UErrorCode &status)
-{
+RuleBasedBreakIterator *RuleBasedBreakIterator::createBufferClone(
+ void * /*stackBuffer*/, int32_t &bufferSize, UErrorCode &status) {
if (U_FAILURE(status)){
return NULL;
}
diff --git a/icu4c/source/common/schriter.cpp b/icu4c/source/common/schriter.cpp
index f852800..17b68ae 100644
--- a/icu4c/source/common/schriter.cpp
+++ b/icu4c/source/common/schriter.cpp
@@ -101,7 +101,7 @@
&& end == realThat.end;
}
-CharacterIterator*
+StringCharacterIterator*
StringCharacterIterator::clone() const {
return new StringCharacterIterator(*this);
}
diff --git a/icu4c/source/common/uchriter.cpp b/icu4c/source/common/uchriter.cpp
index 822168f..bedbabc 100644
--- a/icu4c/source/common/uchriter.cpp
+++ b/icu4c/source/common/uchriter.cpp
@@ -89,7 +89,7 @@
return ustr_hashUCharsN(text, textLength) ^ pos ^ begin ^ end;
}
-CharacterIterator*
+UCharCharacterIterator*
UCharCharacterIterator::clone() const {
return new UCharCharacterIterator(*this);
}
diff --git a/icu4c/source/common/unicode/brkiter.h b/icu4c/source/common/unicode/brkiter.h
index a0fbf72..7448198 100644
--- a/icu4c/source/common/unicode/brkiter.h
+++ b/icu4c/source/common/unicode/brkiter.h
@@ -139,7 +139,7 @@
* method which subclasses implement.
* @stable ICU 2.0
*/
- virtual BreakIterator* clone(void) const = 0;
+ virtual BreakIterator* clone() const = 0;
/**
* Return a polymorphic class ID for this object. Different subclasses
diff --git a/icu4c/source/common/unicode/chariter.h b/icu4c/source/common/unicode/chariter.h
index 0e9b7cd..db86f79 100644
--- a/icu4c/source/common/unicode/chariter.h
+++ b/icu4c/source/common/unicode/chariter.h
@@ -380,7 +380,7 @@
* @return a pointer to a new CharacterIterator
* @stable ICU 2.0
*/
- virtual CharacterIterator* clone(void) const = 0;
+ virtual CharacterIterator* clone() const = 0;
/**
* Sets the iterator to refer to the first code unit in its
diff --git a/icu4c/source/common/unicode/normlzr.h b/icu4c/source/common/unicode/normlzr.h
index 41f10a1..05bc9df 100644
--- a/icu4c/source/common/unicode/normlzr.h
+++ b/icu4c/source/common/unicode/normlzr.h
@@ -601,7 +601,7 @@
* @return a pointer to a new Normalizer
* @deprecated ICU 56 Use Normalizer2 instead.
*/
- Normalizer* clone(void) const;
+ Normalizer* clone() const;
/**
* Generates a hash code for this iterator.
diff --git a/icu4c/source/common/unicode/rbbi.h b/icu4c/source/common/unicode/rbbi.h
index 5e6b3ab..90dee20 100644
--- a/icu4c/source/common/unicode/rbbi.h
+++ b/icu4c/source/common/unicode/rbbi.h
@@ -274,7 +274,7 @@
* @return a newly-constructed RuleBasedBreakIterator
* @stable ICU 2.0
*/
- virtual BreakIterator* clone() const;
+ virtual RuleBasedBreakIterator* clone() const;
/**
* Compute a hash code for this BreakIterator
@@ -564,9 +564,9 @@
* or if the stackBuffer was too small to hold the clone.
* @deprecated ICU 52. Use clone() instead.
*/
- virtual BreakIterator * createBufferClone(void *stackBuffer,
- int32_t &BufferSize,
- UErrorCode &status);
+ virtual RuleBasedBreakIterator *createBufferClone(void *stackBuffer,
+ int32_t &BufferSize,
+ UErrorCode &status);
/**
diff --git a/icu4c/source/common/unicode/rep.h b/icu4c/source/common/unicode/rep.h
index 68b2e7c..6dd4530 100644
--- a/icu4c/source/common/unicode/rep.h
+++ b/icu4c/source/common/unicode/rep.h
@@ -193,9 +193,6 @@
* Clones can be used concurrently in multiple threads.
* If a subclass does not implement clone(), or if an error occurs,
* then NULL is returned.
- * The clone functions in all subclasses return a pointer to a Replaceable
- * because some compilers do not support covariant (same-as-this)
- * return types; cast to the appropriate subclass if necessary.
* The caller must delete the clone.
*
* @return a clone of this object
diff --git a/icu4c/source/common/unicode/schriter.h b/icu4c/source/common/unicode/schriter.h
index b38f95d..1ca5b70 100644
--- a/icu4c/source/common/unicode/schriter.h
+++ b/icu4c/source/common/unicode/schriter.h
@@ -133,7 +133,7 @@
* @return the newly cloned object.
* @stable ICU 2.0
*/
- virtual CharacterIterator* clone(void) const;
+ virtual StringCharacterIterator* clone() const;
/**
* Sets the iterator to iterate over the provided string.
diff --git a/icu4c/source/common/unicode/strenum.h b/icu4c/source/common/unicode/strenum.h
index a303c5a9..8601f1f 100644
--- a/icu4c/source/common/unicode/strenum.h
+++ b/icu4c/source/common/unicode/strenum.h
@@ -71,9 +71,6 @@
* Clones can be used concurrently in multiple threads.
* If a subclass does not implement clone(), or if an error occurs,
* then NULL is returned.
- * The clone functions in all subclasses return a base class pointer
- * because some compilers do not support covariant (same-as-this)
- * return types; cast to the appropriate subclass if necessary.
* The caller must delete the clone.
*
* @return a clone of this object
diff --git a/icu4c/source/common/unicode/uchriter.h b/icu4c/source/common/unicode/uchriter.h
index bf7c1ce..a485259 100644
--- a/icu4c/source/common/unicode/uchriter.h
+++ b/icu4c/source/common/unicode/uchriter.h
@@ -135,7 +135,7 @@
* @return the CharacterIterator newly created
* @stable ICU 2.0
*/
- virtual CharacterIterator* clone(void) const;
+ virtual UCharCharacterIterator* clone() const;
/**
* Sets the iterator to refer to the first code unit in its
diff --git a/icu4c/source/common/unicode/uniset.h b/icu4c/source/common/unicode/uniset.h
index 77fab60..c8525ad 100644
--- a/icu4c/source/common/unicode/uniset.h
+++ b/icu4c/source/common/unicode/uniset.h
@@ -505,7 +505,7 @@
* @see cloneAsThawed
* @stable ICU 2.0
*/
- virtual UnicodeFunctor* clone() const;
+ virtual UnicodeSet* clone() const;
/**
* Returns the hash code value for this set.
@@ -583,7 +583,7 @@
* @see cloneAsThawed
* @stable ICU 3.8
*/
- UnicodeFunctor *freeze();
+ UnicodeSet *freeze();
/**
* Clone the set and make the clone mutable.
@@ -593,7 +593,7 @@
* @see isFrozen
* @stable ICU 3.8
*/
- UnicodeFunctor *cloneAsThawed() const;
+ UnicodeSet *cloneAsThawed() const;
//----------------------------------------------------------------
// Public API
diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h
index 012b25f..a22743f 100644
--- a/icu4c/source/common/unicode/unistr.h
+++ b/icu4c/source/common/unicode/unistr.h
@@ -3326,9 +3326,6 @@
* Clones can be used concurrently in multiple threads.
* If a subclass does not implement clone(), or if an error occurs,
* then NULL is returned.
- * The clone functions in all subclasses return a pointer to a Replaceable
- * because some compilers do not support covariant (same-as-this)
- * return types; cast to the appropriate subclass if necessary.
* The caller must delete the clone.
*
* @return a clone of this object
@@ -3337,7 +3334,7 @@
* @see getDynamicClassID
* @stable ICU 2.6
*/
- virtual Replaceable *clone() const;
+ virtual UnicodeString *clone() const;
/** Destructor.
* @stable ICU 2.0
diff --git a/icu4c/source/common/unicode/uobject.h b/icu4c/source/common/unicode/uobject.h
index b9b32ca..eeb331c 100644
--- a/icu4c/source/common/unicode/uobject.h
+++ b/icu4c/source/common/unicode/uobject.h
@@ -215,11 +215,8 @@
* The clone() function is not available in UObject because it is not
* implemented by all ICU classes.
* Many ICU services provide a clone() function for their class trees,
- * defined on the service's C++ base class, and all subclasses within that
- * service class tree return a pointer to the service base class
+ * defined on the service's C++ base class
* (which itself is a subclass of UObject).
- * This is because some compilers do not support covariant (same-as-this)
- * return types; cast to the appropriate subclass if necessary.
*
* @stable ICU 2.2
*/
diff --git a/icu4c/source/common/uniset.cpp b/icu4c/source/common/uniset.cpp
index 2024277..b73d612 100644
--- a/icu4c/source/common/uniset.cpp
+++ b/icu4c/source/common/uniset.cpp
@@ -278,11 +278,11 @@
* to support cloning in order to allow classes using
* UnicodeMatchers, such as Transliterator, to implement cloning.
*/
-UnicodeFunctor* UnicodeSet::clone() const {
+UnicodeSet* UnicodeSet::clone() const {
return new UnicodeSet(*this);
}
-UnicodeFunctor *UnicodeSet::cloneAsThawed() const {
+UnicodeSet *UnicodeSet::cloneAsThawed() const {
return new UnicodeSet(*this, TRUE);
}
@@ -2172,7 +2172,7 @@
// We can regenerate an equivalent pattern later when requested.
}
-UnicodeFunctor *UnicodeSet::freeze() {
+UnicodeSet *UnicodeSet::freeze() {
if(!isFrozen() && !isBogus()) {
compact();
diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp
index 8f06515..901bb33 100644
--- a/icu4c/source/common/unistr.cpp
+++ b/icu4c/source/common/unistr.cpp
@@ -332,7 +332,7 @@
}
// UnicodeString overrides clone() with a real implementation
-Replaceable *
+UnicodeString *
UnicodeString::clone() const {
return new UnicodeString(*this);
}
diff --git a/icu4c/source/common/ustr_titlecase_brkiter.cpp b/icu4c/source/common/ustr_titlecase_brkiter.cpp
index 056b40e..457905e 100644
--- a/icu4c/source/common/ustr_titlecase_brkiter.cpp
+++ b/icu4c/source/common/ustr_titlecase_brkiter.cpp
@@ -45,7 +45,7 @@
WholeStringBreakIterator() : BreakIterator(), length(0) {}
~WholeStringBreakIterator() U_OVERRIDE;
UBool operator==(const BreakIterator&) const U_OVERRIDE;
- BreakIterator *clone() const U_OVERRIDE;
+ WholeStringBreakIterator *clone() const U_OVERRIDE;
static UClassID U_EXPORT2 getStaticClassID();
UClassID getDynamicClassID() const U_OVERRIDE;
CharacterIterator &getText() const U_OVERRIDE;
@@ -62,9 +62,9 @@
int32_t preceding(int32_t offset) U_OVERRIDE;
UBool isBoundary(int32_t offset) U_OVERRIDE;
int32_t next(int32_t n) U_OVERRIDE;
- BreakIterator *createBufferClone(void *stackBuffer, int32_t &BufferSize,
- UErrorCode &errorCode) U_OVERRIDE;
- BreakIterator &refreshInputText(UText *input, UErrorCode &errorCode) U_OVERRIDE;
+ WholeStringBreakIterator *createBufferClone(void *stackBuffer, int32_t &BufferSize,
+ UErrorCode &errorCode) U_OVERRIDE;
+ WholeStringBreakIterator &refreshInputText(UText *input, UErrorCode &errorCode) U_OVERRIDE;
private:
int32_t length;
@@ -74,7 +74,7 @@
WholeStringBreakIterator::~WholeStringBreakIterator() {}
UBool WholeStringBreakIterator::operator==(const BreakIterator&) const { return FALSE; }
-BreakIterator *WholeStringBreakIterator::clone() const { return nullptr; }
+WholeStringBreakIterator *WholeStringBreakIterator::clone() const { return nullptr; }
CharacterIterator &WholeStringBreakIterator::getText() const {
UPRV_UNREACHABLE; // really should not be called
@@ -113,14 +113,14 @@
UBool WholeStringBreakIterator::isBoundary(int32_t /*offset*/) { return FALSE; }
int32_t WholeStringBreakIterator::next(int32_t /*n*/) { return length; }
-BreakIterator *WholeStringBreakIterator::createBufferClone(
+WholeStringBreakIterator *WholeStringBreakIterator::createBufferClone(
void * /*stackBuffer*/, int32_t & /*BufferSize*/, UErrorCode &errorCode) {
if (U_SUCCESS(errorCode)) {
errorCode = U_UNSUPPORTED_ERROR;
}
return nullptr;
}
-BreakIterator &WholeStringBreakIterator::refreshInputText(
+WholeStringBreakIterator &WholeStringBreakIterator::refreshInputText(
UText * /*input*/, UErrorCode &errorCode) {
if (U_SUCCESS(errorCode)) {
errorCode = U_UNSUPPORTED_ERROR;
diff --git a/icu4c/source/i18n/anytrans.cpp b/icu4c/source/i18n/anytrans.cpp
index 6e382b8..167b018 100644
--- a/icu4c/source/i18n/anytrans.cpp
+++ b/icu4c/source/i18n/anytrans.cpp
@@ -226,7 +226,7 @@
/**
* Transliterator API.
*/
-Transliterator* AnyTransliterator::clone() const {
+AnyTransliterator* AnyTransliterator::clone() const {
return new AnyTransliterator(*this);
}
diff --git a/icu4c/source/i18n/anytrans.h b/icu4c/source/i18n/anytrans.h
index 703d42b..627dee3 100644
--- a/icu4c/source/i18n/anytrans.h
+++ b/icu4c/source/i18n/anytrans.h
@@ -66,7 +66,7 @@
/**
* Transliterator API.
*/
- virtual Transliterator* clone() const;
+ virtual AnyTransliterator* clone() const;
/**
* Implements {@link Transliterator#handleTransliterate}.
diff --git a/icu4c/source/i18n/brktrans.cpp b/icu4c/source/i18n/brktrans.cpp
index ac9e2af..46b0e34 100644
--- a/icu4c/source/i18n/brktrans.cpp
+++ b/icu4c/source/i18n/brktrans.cpp
@@ -64,7 +64,7 @@
/**
* Transliterator API.
*/
-Transliterator* BreakTransliterator::clone(void) const {
+BreakTransliterator* BreakTransliterator::clone() const {
return new BreakTransliterator(*this);
}
diff --git a/icu4c/source/i18n/brktrans.h b/icu4c/source/i18n/brktrans.h
index 30cf4ea..cb3def9 100644
--- a/icu4c/source/i18n/brktrans.h
+++ b/icu4c/source/i18n/brktrans.h
@@ -54,7 +54,7 @@
* Transliterator API.
* @return A copy of the object.
*/
- virtual Transliterator* clone(void) const;
+ virtual BreakTransliterator* clone() const;
virtual const UnicodeString &getInsertion() const;
diff --git a/icu4c/source/i18n/buddhcal.cpp b/icu4c/source/i18n/buddhcal.cpp
index 2a36bd3..6083349 100644
--- a/icu4c/source/i18n/buddhcal.cpp
+++ b/icu4c/source/i18n/buddhcal.cpp
@@ -53,7 +53,7 @@
return *this;
}
-Calendar* BuddhistCalendar::clone(void) const
+BuddhistCalendar* BuddhistCalendar::clone() const
{
return new BuddhistCalendar(*this);
}
diff --git a/icu4c/source/i18n/buddhcal.h b/icu4c/source/i18n/buddhcal.h
index 88509ba..0ad0886 100644
--- a/icu4c/source/i18n/buddhcal.h
+++ b/icu4c/source/i18n/buddhcal.h
@@ -94,7 +94,7 @@
* @return return a polymorphic copy of this calendar.
* @internal
*/
- virtual Calendar* clone(void) const;
+ virtual BuddhistCalendar* clone() const;
public:
/**
diff --git a/icu4c/source/i18n/casetrn.cpp b/icu4c/source/i18n/casetrn.cpp
index ac28365..bb650f8 100644
--- a/icu4c/source/i18n/casetrn.cpp
+++ b/icu4c/source/i18n/casetrn.cpp
@@ -125,7 +125,7 @@
/**
* Transliterator API.
*/
-/*Transliterator* CaseMapTransliterator::clone(void) const {
+/*CaseMapTransliterator* CaseMapTransliterator::clone() const {
return new CaseMapTransliterator(*this);
}*/
diff --git a/icu4c/source/i18n/casetrn.h b/icu4c/source/i18n/casetrn.h
index 744406e..2ec3e73 100644
--- a/icu4c/source/i18n/casetrn.h
+++ b/icu4c/source/i18n/casetrn.h
@@ -58,7 +58,7 @@
* Transliterator API.
* @return a copy of the object.
*/
- virtual Transliterator* clone(void) const = 0;
+ virtual CaseMapTransliterator* clone() const = 0;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/chnsecal.cpp b/icu4c/source/i18n/chnsecal.cpp
index bd85db1..4c03812 100644
--- a/icu4c/source/i18n/chnsecal.cpp
+++ b/icu4c/source/i18n/chnsecal.cpp
@@ -118,7 +118,7 @@
//-------------------------------------------------------------------------
-Calendar* ChineseCalendar::clone() const {
+ChineseCalendar* ChineseCalendar::clone() const {
return new ChineseCalendar(*this);
}
diff --git a/icu4c/source/i18n/chnsecal.h b/icu4c/source/i18n/chnsecal.h
index 11a9b43..a0c21b6 100644
--- a/icu4c/source/i18n/chnsecal.h
+++ b/icu4c/source/i18n/chnsecal.h
@@ -144,7 +144,7 @@
virtual ~ChineseCalendar();
// clone
- virtual Calendar* clone() const;
+ virtual ChineseCalendar* clone() const;
private:
diff --git a/icu4c/source/i18n/choicfmt.cpp b/icu4c/source/i18n/choicfmt.cpp
index 42e1fa2..7e26bb7 100644
--- a/icu4c/source/i18n/choicfmt.cpp
+++ b/icu4c/source/i18n/choicfmt.cpp
@@ -563,7 +563,7 @@
// -------------------------------------
-Format*
+ChoiceFormat*
ChoiceFormat::clone() const
{
ChoiceFormat *aCopy = new ChoiceFormat(*this);
diff --git a/icu4c/source/i18n/compactdecimalformat.cpp b/icu4c/source/i18n/compactdecimalformat.cpp
index 8211928..a4c9dad 100644
--- a/icu4c/source/i18n/compactdecimalformat.cpp
+++ b/icu4c/source/i18n/compactdecimalformat.cpp
@@ -45,7 +45,7 @@
return *this;
}
-Format* CompactDecimalFormat::clone() const {
+CompactDecimalFormat* CompactDecimalFormat::clone() const {
return new CompactDecimalFormat(*this);
}
diff --git a/icu4c/source/i18n/coptccal.cpp b/icu4c/source/i18n/coptccal.cpp
index ba2040d..9c2b1eb 100644
--- a/icu4c/source/i18n/coptccal.cpp
+++ b/icu4c/source/i18n/coptccal.cpp
@@ -40,7 +40,7 @@
{
}
-Calendar*
+CopticCalendar*
CopticCalendar::clone() const
{
return new CopticCalendar(*this);
diff --git a/icu4c/source/i18n/coptccal.h b/icu4c/source/i18n/coptccal.h
index 5c38aa6..e9e812d 100644
--- a/icu4c/source/i18n/coptccal.h
+++ b/icu4c/source/i18n/coptccal.h
@@ -145,7 +145,7 @@
* @return return a polymorphic copy of this calendar.
* @internal
*/
- virtual Calendar* clone(void) const;
+ virtual CopticCalendar* clone() const;
/**
* return the calendar type, "coptic"
diff --git a/icu4c/source/i18n/cpdtrans.cpp b/icu4c/source/i18n/cpdtrans.cpp
index db2ddb7..82ee54a 100644
--- a/icu4c/source/i18n/cpdtrans.cpp
+++ b/icu4c/source/i18n/cpdtrans.cpp
@@ -323,7 +323,7 @@
/**
* Transliterator API.
*/
-Transliterator* CompoundTransliterator::clone(void) const {
+CompoundTransliterator* CompoundTransliterator::clone() const {
return new CompoundTransliterator(*this);
}
diff --git a/icu4c/source/i18n/cpdtrans.h b/icu4c/source/i18n/cpdtrans.h
index 076296a..a2c7abb 100644
--- a/icu4c/source/i18n/cpdtrans.h
+++ b/icu4c/source/i18n/cpdtrans.h
@@ -98,7 +98,7 @@
/**
* Transliterator API.
*/
- virtual Transliterator* clone(void) const;
+ virtual CompoundTransliterator* clone() const;
/**
* Returns the number of transliterators in this chain.
diff --git a/icu4c/source/i18n/curramt.cpp b/icu4c/source/i18n/curramt.cpp
index d224270..6fd2ea2 100644
--- a/icu4c/source/i18n/curramt.cpp
+++ b/icu4c/source/i18n/curramt.cpp
@@ -38,7 +38,7 @@
return *this;
}
-UObject* CurrencyAmount::clone() const {
+CurrencyAmount* CurrencyAmount::clone() const {
return new CurrencyAmount(*this);
}
diff --git a/icu4c/source/i18n/currfmt.cpp b/icu4c/source/i18n/currfmt.cpp
index 8f20f78..0ad0492 100644
--- a/icu4c/source/i18n/currfmt.cpp
+++ b/icu4c/source/i18n/currfmt.cpp
@@ -33,7 +33,7 @@
CurrencyFormat::~CurrencyFormat() {
}
-Format* CurrencyFormat::clone() const {
+CurrencyFormat* CurrencyFormat::clone() const {
return new CurrencyFormat(*this);
}
diff --git a/icu4c/source/i18n/currfmt.h b/icu4c/source/i18n/currfmt.h
index cc9bb3c..69a0319 100644
--- a/icu4c/source/i18n/currfmt.h
+++ b/icu4c/source/i18n/currfmt.h
@@ -57,7 +57,7 @@
/**
* Override Format API.
*/
- virtual Format* clone() const;
+ virtual CurrencyFormat* clone() const;
using MeasureFormat::format;
diff --git a/icu4c/source/i18n/currunit.cpp b/icu4c/source/i18n/currunit.cpp
index a5b039f..dab6dda 100644
--- a/icu4c/source/i18n/currunit.cpp
+++ b/icu4c/source/i18n/currunit.cpp
@@ -109,7 +109,7 @@
return *this;
}
-UObject* CurrencyUnit::clone() const {
+CurrencyUnit* CurrencyUnit::clone() const {
return new CurrencyUnit(*this);
}
diff --git a/icu4c/source/i18n/dangical.cpp b/icu4c/source/i18n/dangical.cpp
index 73bc421..02db403 100644
--- a/icu4c/source/i18n/dangical.cpp
+++ b/icu4c/source/i18n/dangical.cpp
@@ -65,7 +65,7 @@
{
}
-Calendar*
+DangiCalendar*
DangiCalendar::clone() const
{
return new DangiCalendar(*this);
diff --git a/icu4c/source/i18n/dangical.h b/icu4c/source/i18n/dangical.h
index 04bd67b..ece805e 100644
--- a/icu4c/source/i18n/dangical.h
+++ b/icu4c/source/i18n/dangical.h
@@ -66,7 +66,7 @@
* Clone.
* @internal
*/
- virtual Calendar* clone() const;
+ virtual DangiCalendar* clone() const;
//----------------------------------------------------------------------
// Internal methods & astronomical calculations
diff --git a/icu4c/source/i18n/decimfmt.cpp b/icu4c/source/i18n/decimfmt.cpp
index b729035..cb82e7f 100644
--- a/icu4c/source/i18n/decimfmt.cpp
+++ b/icu4c/source/i18n/decimfmt.cpp
@@ -485,7 +485,7 @@
delete fields;
}
-Format* DecimalFormat::clone() const {
+DecimalFormat* DecimalFormat::clone() const {
// can only clone valid objects.
if (fields == nullptr) {
return nullptr;
diff --git a/icu4c/source/i18n/dtitvfmt.cpp b/icu4c/source/i18n/dtitvfmt.cpp
index f5d8694..8f4fcc5 100644
--- a/icu4c/source/i18n/dtitvfmt.cpp
+++ b/icu4c/source/i18n/dtitvfmt.cpp
@@ -215,8 +215,8 @@
}
-Format*
-DateIntervalFormat::clone(void) const {
+DateIntervalFormat*
+DateIntervalFormat::clone() const {
return new DateIntervalFormat(*this);
}
diff --git a/icu4c/source/i18n/esctrn.cpp b/icu4c/source/i18n/esctrn.cpp
index 900bed7..ba0e4c2 100644
--- a/icu4c/source/i18n/esctrn.cpp
+++ b/icu4c/source/i18n/esctrn.cpp
@@ -122,7 +122,7 @@
/**
* Transliterator API.
*/
-Transliterator* EscapeTransliterator::clone() const {
+EscapeTransliterator* EscapeTransliterator::clone() const {
return new EscapeTransliterator(*this);
}
diff --git a/icu4c/source/i18n/esctrn.h b/icu4c/source/i18n/esctrn.h
index 60ecc74..2a2c6dc 100644
--- a/icu4c/source/i18n/esctrn.h
+++ b/icu4c/source/i18n/esctrn.h
@@ -115,7 +115,7 @@
/**
* Transliterator API.
*/
- virtual Transliterator* clone() const;
+ virtual EscapeTransliterator* clone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/ethpccal.cpp b/icu4c/source/i18n/ethpccal.cpp
index 995dd6a..7c7c0ba 100644
--- a/icu4c/source/i18n/ethpccal.cpp
+++ b/icu4c/source/i18n/ethpccal.cpp
@@ -46,7 +46,7 @@
{
}
-Calendar*
+EthiopicCalendar*
EthiopicCalendar::clone() const
{
return new EthiopicCalendar(*this);
diff --git a/icu4c/source/i18n/ethpccal.h b/icu4c/source/i18n/ethpccal.h
index acd7c3c..d1e8f42 100644
--- a/icu4c/source/i18n/ethpccal.h
+++ b/icu4c/source/i18n/ethpccal.h
@@ -141,7 +141,7 @@
* @return return a polymorphic copy of this calendar.
* @internal
*/
- virtual Calendar* clone() const;
+ virtual EthiopicCalendar* clone() const;
/**
* return the calendar type, "ethiopic"
diff --git a/icu4c/source/i18n/funcrepl.cpp b/icu4c/source/i18n/funcrepl.cpp
index 01c8754..7dd54ed 100644
--- a/icu4c/source/i18n/funcrepl.cpp
+++ b/icu4c/source/i18n/funcrepl.cpp
@@ -59,7 +59,7 @@
/**
* Implement UnicodeFunctor
*/
-UnicodeFunctor* FunctionReplacer::clone() const {
+FunctionReplacer* FunctionReplacer::clone() const {
return new FunctionReplacer(*this);
}
diff --git a/icu4c/source/i18n/funcrepl.h b/icu4c/source/i18n/funcrepl.h
index a835d5b..fe41f6c 100644
--- a/icu4c/source/i18n/funcrepl.h
+++ b/icu4c/source/i18n/funcrepl.h
@@ -70,7 +70,7 @@
/**
* Implement UnicodeFunctor
*/
- virtual UnicodeFunctor* clone() const;
+ virtual FunctionReplacer* clone() const;
/**
* UnicodeFunctor API. Cast 'this' to a UnicodeReplacer* pointer
diff --git a/icu4c/source/i18n/gregocal.cpp b/icu4c/source/i18n/gregocal.cpp
index 71faeb0..ee15b52 100644
--- a/icu4c/source/i18n/gregocal.cpp
+++ b/icu4c/source/i18n/gregocal.cpp
@@ -286,7 +286,7 @@
// -------------------------------------
-Calendar* GregorianCalendar::clone() const
+GregorianCalendar* GregorianCalendar::clone() const
{
return new GregorianCalendar(*this);
}
diff --git a/icu4c/source/i18n/hebrwcal.cpp b/icu4c/source/i18n/hebrwcal.cpp
index c025be4..c8fb8a1 100644
--- a/icu4c/source/i18n/hebrwcal.cpp
+++ b/icu4c/source/i18n/hebrwcal.cpp
@@ -169,7 +169,7 @@
return "hebrew";
}
-Calendar* HebrewCalendar::clone() const {
+HebrewCalendar* HebrewCalendar::clone() const {
return new HebrewCalendar(*this);
}
diff --git a/icu4c/source/i18n/hebrwcal.h b/icu4c/source/i18n/hebrwcal.h
index bde6466..08136de 100644
--- a/icu4c/source/i18n/hebrwcal.h
+++ b/icu4c/source/i18n/hebrwcal.h
@@ -192,7 +192,7 @@
* @return return a polymorphic copy of this calendar.
* @internal
*/
- virtual Calendar* clone(void) const;
+ virtual HebrewCalendar* clone() const;
public:
/**
diff --git a/icu4c/source/i18n/indiancal.cpp b/icu4c/source/i18n/indiancal.cpp
index ae1098f..f1ab853 100644
--- a/icu4c/source/i18n/indiancal.cpp
+++ b/icu4c/source/i18n/indiancal.cpp
@@ -35,7 +35,7 @@
//-------------------------------------------------------------------------
-Calendar* IndianCalendar::clone() const {
+IndianCalendar* IndianCalendar::clone() const {
return new IndianCalendar(*this);
}
diff --git a/icu4c/source/i18n/indiancal.h b/icu4c/source/i18n/indiancal.h
index e36d4eb..e259d9b 100644
--- a/icu4c/source/i18n/indiancal.h
+++ b/icu4c/source/i18n/indiancal.h
@@ -186,7 +186,7 @@
// TODO: copy c'tor, etc
// clone
- virtual Calendar* clone() const;
+ virtual IndianCalendar* clone() const;
private:
/**
diff --git a/icu4c/source/i18n/islamcal.cpp b/icu4c/source/i18n/islamcal.cpp
index 6e91d6e..582b336 100644
--- a/icu4c/source/i18n/islamcal.cpp
+++ b/icu4c/source/i18n/islamcal.cpp
@@ -227,7 +227,7 @@
return sType;
}
-Calendar* IslamicCalendar::clone() const {
+IslamicCalendar* IslamicCalendar::clone() const {
return new IslamicCalendar(*this);
}
diff --git a/icu4c/source/i18n/islamcal.h b/icu4c/source/i18n/islamcal.h
index 062733e..fde5847 100644
--- a/icu4c/source/i18n/islamcal.h
+++ b/icu4c/source/i18n/islamcal.h
@@ -230,7 +230,7 @@
// TODO: copy c'tor, etc
// clone
- virtual Calendar* clone() const;
+ virtual IslamicCalendar* clone() const;
private:
/**
diff --git a/icu4c/source/i18n/japancal.cpp b/icu4c/source/i18n/japancal.cpp
index 1cb43f3..75a248f 100644
--- a/icu4c/source/i18n/japancal.cpp
+++ b/icu4c/source/i18n/japancal.cpp
@@ -136,7 +136,7 @@
return *this;
}
-Calendar* JapaneseCalendar::clone(void) const
+JapaneseCalendar* JapaneseCalendar::clone() const
{
return new JapaneseCalendar(*this);
}
diff --git a/icu4c/source/i18n/japancal.h b/icu4c/source/i18n/japancal.h
index 25409d4..03e6361 100644
--- a/icu4c/source/i18n/japancal.h
+++ b/icu4c/source/i18n/japancal.h
@@ -116,7 +116,7 @@
* @return return a polymorphic copy of this calendar.
* @internal
*/
- virtual Calendar* clone(void) const;
+ virtual JapaneseCalendar* clone() const;
/**
* Return the extended year defined by the current fields. In the
diff --git a/icu4c/source/i18n/measfmt.cpp b/icu4c/source/i18n/measfmt.cpp
index 8f306c0..7d9612d 100644
--- a/icu4c/source/i18n/measfmt.cpp
+++ b/icu4c/source/i18n/measfmt.cpp
@@ -460,7 +460,7 @@
**numberFormat == **rhs.numberFormat);
}
-Format *MeasureFormat::clone() const {
+MeasureFormat *MeasureFormat::clone() const {
return new MeasureFormat(*this);
}
diff --git a/icu4c/source/i18n/measunit.cpp b/icu4c/source/i18n/measunit.cpp
index 9ae7aeb..82f595b 100644
--- a/icu4c/source/i18n/measunit.cpp
+++ b/icu4c/source/i18n/measunit.cpp
@@ -1923,7 +1923,7 @@
return *this;
}
-UObject *MeasureUnit::clone() const {
+MeasureUnit *MeasureUnit::clone() const {
return new MeasureUnit(*this);
}
diff --git a/icu4c/source/i18n/measure.cpp b/icu4c/source/i18n/measure.cpp
index d9084f8..a10b37f 100644
--- a/icu4c/source/i18n/measure.cpp
+++ b/icu4c/source/i18n/measure.cpp
@@ -48,7 +48,7 @@
return *this;
}
-UObject *Measure::clone() const {
+Measure *Measure::clone() const {
return new Measure(*this);
}
diff --git a/icu4c/source/i18n/msgfmt.cpp b/icu4c/source/i18n/msgfmt.cpp
index 8a824ba..3ca368e 100644
--- a/icu4c/source/i18n/msgfmt.cpp
+++ b/icu4c/source/i18n/msgfmt.cpp
@@ -436,7 +436,7 @@
// -------------------------------------
// Creates a copy of this MessageFormat, the caller owns the copy.
-Format*
+MessageFormat*
MessageFormat::clone() const
{
return new MessageFormat(*this);
@@ -1873,7 +1873,7 @@
return TRUE;
}
-Format* MessageFormat::DummyFormat::clone() const {
+MessageFormat::DummyFormat* MessageFormat::DummyFormat::clone() const {
return new DummyFormat();
}
diff --git a/icu4c/source/i18n/name2uni.cpp b/icu4c/source/i18n/name2uni.cpp
index 69e92b8..52bab80 100644
--- a/icu4c/source/i18n/name2uni.cpp
+++ b/icu4c/source/i18n/name2uni.cpp
@@ -100,7 +100,7 @@
/**
* Transliterator API.
*/
-Transliterator* NameUnicodeTransliterator::clone(void) const {
+NameUnicodeTransliterator* NameUnicodeTransliterator::clone() const {
return new NameUnicodeTransliterator(*this);
}
diff --git a/icu4c/source/i18n/name2uni.h b/icu4c/source/i18n/name2uni.h
index 4c743de..44ad85f 100644
--- a/icu4c/source/i18n/name2uni.h
+++ b/icu4c/source/i18n/name2uni.h
@@ -49,7 +49,7 @@
* Transliterator API.
* @return A copy of the object.
*/
- virtual Transliterator* clone(void) const;
+ virtual NameUnicodeTransliterator* clone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/nortrans.cpp b/icu4c/source/i18n/nortrans.cpp
index 589c824..6a8d2c7 100644
--- a/icu4c/source/i18n/nortrans.cpp
+++ b/icu4c/source/i18n/nortrans.cpp
@@ -92,7 +92,7 @@
/**
* Transliterator API.
*/
-Transliterator* NormalizationTransliterator::clone(void) const {
+NormalizationTransliterator* NormalizationTransliterator::clone() const {
return new NormalizationTransliterator(*this);
}
diff --git a/icu4c/source/i18n/nortrans.h b/icu4c/source/i18n/nortrans.h
index d309452..198ed29 100644
--- a/icu4c/source/i18n/nortrans.h
+++ b/icu4c/source/i18n/nortrans.h
@@ -44,7 +44,7 @@
* Transliterator API.
* @return A copy of the object.
*/
- virtual Transliterator* clone(void) const;
+ virtual NormalizationTransliterator* clone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/nounit.cpp b/icu4c/source/i18n/nounit.cpp
index db07387..076f76f 100644
--- a/icu4c/source/i18n/nounit.cpp
+++ b/icu4c/source/i18n/nounit.cpp
@@ -29,7 +29,7 @@
NoUnit::NoUnit(const NoUnit& other) : MeasureUnit(other) {
}
-UObject* NoUnit::clone() const {
+NoUnit* NoUnit::clone() const {
return new NoUnit(*this);
}
diff --git a/icu4c/source/i18n/nultrans.cpp b/icu4c/source/i18n/nultrans.cpp
index 62d1290..439cc55 100644
--- a/icu4c/source/i18n/nultrans.cpp
+++ b/icu4c/source/i18n/nultrans.cpp
@@ -24,7 +24,7 @@
NullTransliterator::~NullTransliterator() {}
-Transliterator* NullTransliterator::clone(void) const {
+NullTransliterator* NullTransliterator::clone() const {
return new NullTransliterator();
}
diff --git a/icu4c/source/i18n/nultrans.h b/icu4c/source/i18n/nultrans.h
index a01b04e..36c92fa 100644
--- a/icu4c/source/i18n/nultrans.h
+++ b/icu4c/source/i18n/nultrans.h
@@ -45,7 +45,7 @@
* Transliterator API.
* @internal Use transliterator factory methods instead since this class will be removed in that release.
*/
- virtual Transliterator* clone(void) const;
+ virtual NullTransliterator* clone() const;
/**
* Implements {@link Transliterator#handleTransliterate}.
diff --git a/icu4c/source/i18n/number_asformat.cpp b/icu4c/source/i18n/number_asformat.cpp
index 974dfba..e876174 100644
--- a/icu4c/source/i18n/number_asformat.cpp
+++ b/icu4c/source/i18n/number_asformat.cpp
@@ -43,7 +43,7 @@
return fFormatter.toSkeleton(localStatus) == _other->fFormatter.toSkeleton(localStatus);
}
-Format* LocalizedNumberFormatterAsFormat::clone() const {
+LocalizedNumberFormatterAsFormat* LocalizedNumberFormatterAsFormat::clone() const {
return new LocalizedNumberFormatterAsFormat(*this);
}
diff --git a/icu4c/source/i18n/number_asformat.h b/icu4c/source/i18n/number_asformat.h
index bf82d72..7b0a1de 100644
--- a/icu4c/source/i18n/number_asformat.h
+++ b/icu4c/source/i18n/number_asformat.h
@@ -45,7 +45,7 @@
/**
* Creates a copy of this object.
*/
- Format* clone() const U_OVERRIDE;
+ LocalizedNumberFormatterAsFormat* clone() const U_OVERRIDE;
/**
* Formats a Number using the wrapped LocalizedNumberFormatter. The provided formattable must be a
diff --git a/icu4c/source/i18n/olsontz.cpp b/icu4c/source/i18n/olsontz.cpp
index 7f9fe43..732140b 100644
--- a/icu4c/source/i18n/olsontz.cpp
+++ b/icu4c/source/i18n/olsontz.cpp
@@ -319,7 +319,7 @@
/**
* TimeZone API.
*/
-TimeZone* OlsonTimeZone::clone() const {
+OlsonTimeZone* OlsonTimeZone::clone() const {
return new OlsonTimeZone(*this);
}
diff --git a/icu4c/source/i18n/olsontz.h b/icu4c/source/i18n/olsontz.h
index 7bec8e0..a3b7dcc 100644
--- a/icu4c/source/i18n/olsontz.h
+++ b/icu4c/source/i18n/olsontz.h
@@ -151,7 +151,7 @@
/**
* TimeZone API.
*/
- virtual TimeZone* clone() const;
+ virtual OlsonTimeZone* clone() const;
/**
* TimeZone API.
diff --git a/icu4c/source/i18n/persncal.cpp b/icu4c/source/i18n/persncal.cpp
index f38f779..26fd294 100644
--- a/icu4c/source/i18n/persncal.cpp
+++ b/icu4c/source/i18n/persncal.cpp
@@ -74,7 +74,7 @@
return "persian";
}
-Calendar* PersianCalendar::clone() const {
+PersianCalendar* PersianCalendar::clone() const {
return new PersianCalendar(*this);
}
diff --git a/icu4c/source/i18n/persncal.h b/icu4c/source/i18n/persncal.h
index bcfd68a..ce6d739 100644
--- a/icu4c/source/i18n/persncal.h
+++ b/icu4c/source/i18n/persncal.h
@@ -164,7 +164,7 @@
// TODO: copy c'tor, etc
// clone
- virtual Calendar* clone() const;
+ virtual PersianCalendar* clone() const;
private:
/**
diff --git a/icu4c/source/i18n/plurfmt.cpp b/icu4c/source/i18n/plurfmt.cpp
index b2f1487..044f4b3 100644
--- a/icu4c/source/i18n/plurfmt.cpp
+++ b/icu4c/source/i18n/plurfmt.cpp
@@ -362,7 +362,7 @@
}
}
-Format*
+PluralFormat*
PluralFormat::clone() const
{
return new PluralFormat(*this);
diff --git a/icu4c/source/i18n/quant.cpp b/icu4c/source/i18n/quant.cpp
index acf579e..ed33933 100644
--- a/icu4c/source/i18n/quant.cpp
+++ b/icu4c/source/i18n/quant.cpp
@@ -47,7 +47,7 @@
/**
* Implement UnicodeFunctor
*/
-UnicodeFunctor* Quantifier::clone() const {
+Quantifier* Quantifier::clone() const {
return new Quantifier(*this);
}
diff --git a/icu4c/source/i18n/quant.h b/icu4c/source/i18n/quant.h
index 1abb0db..d5aa8e5 100644
--- a/icu4c/source/i18n/quant.h
+++ b/icu4c/source/i18n/quant.h
@@ -45,7 +45,7 @@
* Implement UnicodeFunctor
* @return a copy of the object.
*/
- virtual UnicodeFunctor* clone() const;
+ virtual Quantifier* clone() const;
/**
* Implement UnicodeMatcher
diff --git a/icu4c/source/i18n/rbnf.cpp b/icu4c/source/i18n/rbnf.cpp
index 4078f93..17319fb 100644
--- a/icu4c/source/i18n/rbnf.cpp
+++ b/icu4c/source/i18n/rbnf.cpp
@@ -930,8 +930,8 @@
dispose();
}
-Format*
-RuleBasedNumberFormat::clone(void) const
+RuleBasedNumberFormat*
+RuleBasedNumberFormat::clone() const
{
return new RuleBasedNumberFormat(*this);
}
diff --git a/icu4c/source/i18n/rbt.cpp b/icu4c/source/i18n/rbt.cpp
index 50bffb3..4cef242 100644
--- a/icu4c/source/i18n/rbt.cpp
+++ b/icu4c/source/i18n/rbt.cpp
@@ -191,8 +191,8 @@
}
}
-Transliterator* // Covariant return NOT ALLOWED (for portability)
-RuleBasedTransliterator::clone(void) const {
+RuleBasedTransliterator*
+RuleBasedTransliterator::clone() const {
return new RuleBasedTransliterator(*this);
}
diff --git a/icu4c/source/i18n/rbt.h b/icu4c/source/i18n/rbt.h
index 671149f..97ef01e 100644
--- a/icu4c/source/i18n/rbt.h
+++ b/icu4c/source/i18n/rbt.h
@@ -144,7 +144,7 @@
* Implement Transliterator API.
* @internal Use transliterator factory methods instead since this class will be removed in that release.
*/
- virtual Transliterator* clone(void) const;
+ virtual RuleBasedTransliterator* clone() const;
protected:
/**
diff --git a/icu4c/source/i18n/rbtz.cpp b/icu4c/source/i18n/rbtz.cpp
index 4864555..3249a32 100644
--- a/icu4c/source/i18n/rbtz.cpp
+++ b/icu4c/source/i18n/rbtz.cpp
@@ -356,8 +356,8 @@
fUpToDate = FALSE;
}
-TimeZone*
-RuleBasedTimeZone::clone(void) const {
+RuleBasedTimeZone*
+RuleBasedTimeZone::clone() const {
return new RuleBasedTimeZone(*this);
}
diff --git a/icu4c/source/i18n/reldtfmt.cpp b/icu4c/source/i18n/reldtfmt.cpp
index 5e7dddd..271bda0 100644
--- a/icu4c/source/i18n/reldtfmt.cpp
+++ b/icu4c/source/i18n/reldtfmt.cpp
@@ -131,7 +131,7 @@
}
-Format* RelativeDateFormat::clone(void) const {
+RelativeDateFormat* RelativeDateFormat::clone() const {
return new RelativeDateFormat(*this);
}
diff --git a/icu4c/source/i18n/reldtfmt.h b/icu4c/source/i18n/reldtfmt.h
index aa5f923..ff48d3b 100644
--- a/icu4c/source/i18n/reldtfmt.h
+++ b/icu4c/source/i18n/reldtfmt.h
@@ -71,7 +71,7 @@
* @return A copy of the object.
* @internal ICU 3.8
*/
- virtual Format* clone(void) const;
+ virtual RelativeDateFormat* clone() const;
/**
* Return true if the given Format objects are semantically equal. Objects
diff --git a/icu4c/source/i18n/remtrans.cpp b/icu4c/source/i18n/remtrans.cpp
index 70a6ed3..c198e65 100644
--- a/icu4c/source/i18n/remtrans.cpp
+++ b/icu4c/source/i18n/remtrans.cpp
@@ -48,8 +48,8 @@
RemoveTransliterator::~RemoveTransliterator() {}
-Transliterator* RemoveTransliterator::clone(void) const {
- Transliterator* result = new RemoveTransliterator();
+RemoveTransliterator* RemoveTransliterator::clone() const {
+ RemoveTransliterator* result = new RemoveTransliterator();
if (result != NULL && getFilter() != 0) {
result->adoptFilter((UnicodeFilter*)(getFilter()->clone()));
}
diff --git a/icu4c/source/i18n/remtrans.h b/icu4c/source/i18n/remtrans.h
index ed038d5..13de015 100644
--- a/icu4c/source/i18n/remtrans.h
+++ b/icu4c/source/i18n/remtrans.h
@@ -47,7 +47,7 @@
* Transliterator API.
* @return A copy of the object.
*/
- virtual Transliterator* clone(void) const;
+ virtual RemoveTransliterator* clone() const;
/**
* Implements {@link Transliterator#handleTransliterate}.
diff --git a/icu4c/source/i18n/rulebasedcollator.cpp b/icu4c/source/i18n/rulebasedcollator.cpp
index 92fa538..60acf17 100644
--- a/icu4c/source/i18n/rulebasedcollator.cpp
+++ b/icu4c/source/i18n/rulebasedcollator.cpp
@@ -220,7 +220,7 @@
actualLocaleIsSameAsValid = FALSE;
}
-Collator *
+RuleBasedCollator *
RuleBasedCollator::clone() const {
return new RuleBasedCollator(*this);
}
diff --git a/icu4c/source/i18n/scientificnumberformatter.cpp b/icu4c/source/i18n/scientificnumberformatter.cpp
index 03d98dd..6c2cb3a 100644
--- a/icu4c/source/i18n/scientificnumberformatter.cpp
+++ b/icu4c/source/i18n/scientificnumberformatter.cpp
@@ -121,7 +121,7 @@
return result;
}
-ScientificNumberFormatter::Style *ScientificNumberFormatter::SuperscriptStyle::clone() const {
+ScientificNumberFormatter::SuperscriptStyle *ScientificNumberFormatter::SuperscriptStyle::clone() const {
return new ScientificNumberFormatter::SuperscriptStyle(*this);
}
@@ -195,7 +195,7 @@
return appendTo;
}
-ScientificNumberFormatter::Style *ScientificNumberFormatter::MarkupStyle::clone() const {
+ScientificNumberFormatter::MarkupStyle *ScientificNumberFormatter::MarkupStyle::clone() const {
return new ScientificNumberFormatter::MarkupStyle(*this);
}
diff --git a/icu4c/source/i18n/selfmt.cpp b/icu4c/source/i18n/selfmt.cpp
index 29aee36..47e53d7 100644
--- a/icu4c/source/i18n/selfmt.cpp
+++ b/icu4c/source/i18n/selfmt.cpp
@@ -151,7 +151,7 @@
return msgStart;
}
-Format* SelectFormat::clone() const
+SelectFormat* SelectFormat::clone() const
{
return new SelectFormat(*this);
}
diff --git a/icu4c/source/i18n/simpletz.cpp b/icu4c/source/i18n/simpletz.cpp
index cbf1f9d..7972e2b 100644
--- a/icu4c/source/i18n/simpletz.cpp
+++ b/icu4c/source/i18n/simpletz.cpp
@@ -243,7 +243,7 @@
// -------------------------------------
// Called by TimeZone::createDefault() inside a Mutex - be careful.
-TimeZone*
+SimpleTimeZone*
SimpleTimeZone::clone() const
{
return new SimpleTimeZone(*this);
diff --git a/icu4c/source/i18n/smpdtfmt.cpp b/icu4c/source/i18n/smpdtfmt.cpp
index 1e837c35..c17e54f 100644
--- a/icu4c/source/i18n/smpdtfmt.cpp
+++ b/icu4c/source/i18n/smpdtfmt.cpp
@@ -620,7 +620,7 @@
//----------------------------------------------------------------------
-Format*
+SimpleDateFormat*
SimpleDateFormat::clone() const
{
return new SimpleDateFormat(*this);
diff --git a/icu4c/source/i18n/strmatch.cpp b/icu4c/source/i18n/strmatch.cpp
index aa9e7ae..a20f787 100644
--- a/icu4c/source/i18n/strmatch.cpp
+++ b/icu4c/source/i18n/strmatch.cpp
@@ -58,7 +58,7 @@
/**
* Implement UnicodeFunctor
*/
-UnicodeFunctor* StringMatcher::clone() const {
+StringMatcher* StringMatcher::clone() const {
return new StringMatcher(*this);
}
diff --git a/icu4c/source/i18n/strmatch.h b/icu4c/source/i18n/strmatch.h
index 8ebdb30..71ae984 100644
--- a/icu4c/source/i18n/strmatch.h
+++ b/icu4c/source/i18n/strmatch.h
@@ -78,7 +78,7 @@
* Implement UnicodeFunctor
* @return a copy of the object.
*/
- virtual UnicodeFunctor* clone() const;
+ virtual StringMatcher* clone() const;
/**
* UnicodeFunctor API. Cast 'this' to a UnicodeMatcher* pointer
diff --git a/icu4c/source/i18n/strrepl.cpp b/icu4c/source/i18n/strrepl.cpp
index 0eef3d4..9fafeb2 100644
--- a/icu4c/source/i18n/strrepl.cpp
+++ b/icu4c/source/i18n/strrepl.cpp
@@ -87,7 +87,7 @@
/**
* Implement UnicodeFunctor
*/
-UnicodeFunctor* StringReplacer::clone() const {
+StringReplacer* StringReplacer::clone() const {
return new StringReplacer(*this);
}
diff --git a/icu4c/source/i18n/strrepl.h b/icu4c/source/i18n/strrepl.h
index feec058..7f74d0d 100644
--- a/icu4c/source/i18n/strrepl.h
+++ b/icu4c/source/i18n/strrepl.h
@@ -111,7 +111,7 @@
/**
* Implement UnicodeFunctor
*/
- virtual UnicodeFunctor* clone() const;
+ virtual StringReplacer* clone() const;
/**
* UnicodeFunctor API. Cast 'this' to a UnicodeReplacer* pointer
diff --git a/icu4c/source/i18n/stsearch.cpp b/icu4c/source/i18n/stsearch.cpp
index c556567..3e6ed46 100644
--- a/icu4c/source/i18n/stsearch.cpp
+++ b/icu4c/source/i18n/stsearch.cpp
@@ -282,7 +282,7 @@
usearch_reset(m_strsrch_);
}
-SearchIterator * StringSearch::safeClone(void) const
+StringSearch * StringSearch::safeClone() const
{
UErrorCode status = U_ZERO_ERROR;
StringSearch *result = new StringSearch(m_pattern_, m_text_,
diff --git a/icu4c/source/i18n/taiwncal.cpp b/icu4c/source/i18n/taiwncal.cpp
index dfd5f3c..27352aa 100644
--- a/icu4c/source/i18n/taiwncal.cpp
+++ b/icu4c/source/i18n/taiwncal.cpp
@@ -53,7 +53,7 @@
return *this;
}
-Calendar* TaiwanCalendar::clone(void) const
+TaiwanCalendar* TaiwanCalendar::clone() const
{
return new TaiwanCalendar(*this);
}
diff --git a/icu4c/source/i18n/taiwncal.h b/icu4c/source/i18n/taiwncal.h
index a1c25df..01d4d31 100644
--- a/icu4c/source/i18n/taiwncal.h
+++ b/icu4c/source/i18n/taiwncal.h
@@ -91,7 +91,7 @@
* @return return a polymorphic copy of this calendar.
* @internal
*/
- virtual Calendar* clone(void) const;
+ virtual TaiwanCalendar* clone() const;
public:
/**
diff --git a/icu4c/source/i18n/titletrn.cpp b/icu4c/source/i18n/titletrn.cpp
index 9b37d7f..9c39b46 100644
--- a/icu4c/source/i18n/titletrn.cpp
+++ b/icu4c/source/i18n/titletrn.cpp
@@ -60,7 +60,7 @@
/**
* Transliterator API.
*/
-Transliterator* TitlecaseTransliterator::clone(void) const {
+TitlecaseTransliterator* TitlecaseTransliterator::clone() const {
return new TitlecaseTransliterator(*this);
}
diff --git a/icu4c/source/i18n/titletrn.h b/icu4c/source/i18n/titletrn.h
index 166378f..4e45ac6 100644
--- a/icu4c/source/i18n/titletrn.h
+++ b/icu4c/source/i18n/titletrn.h
@@ -52,7 +52,7 @@
* Transliterator API.
* @return a copy of the object.
*/
- virtual Transliterator* clone(void) const;
+ virtual TitlecaseTransliterator* clone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/tmunit.cpp b/icu4c/source/i18n/tmunit.cpp
index f169c30..910489b 100644
--- a/icu4c/source/i18n/tmunit.cpp
+++ b/icu4c/source/i18n/tmunit.cpp
@@ -102,7 +102,7 @@
: MeasureUnit(other), fTimeUnitField(other.fTimeUnitField) {
}
-UObject*
+TimeUnit*
TimeUnit::clone() const {
return new TimeUnit(*this);
}
diff --git a/icu4c/source/i18n/tmutamt.cpp b/icu4c/source/i18n/tmutamt.cpp
index a69fe57..2546469 100644
--- a/icu4c/source/i18n/tmutamt.cpp
+++ b/icu4c/source/i18n/tmutamt.cpp
@@ -50,7 +50,7 @@
return Measure::operator==(other);
}
-UObject*
+TimeUnitAmount*
TimeUnitAmount::clone() const {
return new TimeUnitAmount(*this);
}
diff --git a/icu4c/source/i18n/tmutfmt.cpp b/icu4c/source/i18n/tmutfmt.cpp
index dad8825..2a4273e 100644
--- a/icu4c/source/i18n/tmutfmt.cpp
+++ b/icu4c/source/i18n/tmutfmt.cpp
@@ -136,8 +136,8 @@
}
-Format*
-TimeUnitFormat::clone(void) const {
+TimeUnitFormat*
+TimeUnitFormat::clone() const {
return new TimeUnitFormat(*this);
}
diff --git a/icu4c/source/i18n/tolowtrn.cpp b/icu4c/source/i18n/tolowtrn.cpp
index 6dae6f1..2893278 100644
--- a/icu4c/source/i18n/tolowtrn.cpp
+++ b/icu4c/source/i18n/tolowtrn.cpp
@@ -58,7 +58,7 @@
/**
* Transliterator API.
*/
-Transliterator* LowercaseTransliterator::clone(void) const {
+LowercaseTransliterator* LowercaseTransliterator::clone() const {
return new LowercaseTransliterator(*this);
}
diff --git a/icu4c/source/i18n/tolowtrn.h b/icu4c/source/i18n/tolowtrn.h
index e311431..2fbfb90 100644
--- a/icu4c/source/i18n/tolowtrn.h
+++ b/icu4c/source/i18n/tolowtrn.h
@@ -50,7 +50,7 @@
* Transliterator API.
* @return a copy of the object.
*/
- virtual Transliterator* clone(void) const;
+ virtual LowercaseTransliterator* clone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/toupptrn.cpp b/icu4c/source/i18n/toupptrn.cpp
index 098dba9..2a8b78b 100644
--- a/icu4c/source/i18n/toupptrn.cpp
+++ b/icu4c/source/i18n/toupptrn.cpp
@@ -58,7 +58,7 @@
/**
* Transliterator API.
*/
-Transliterator* UppercaseTransliterator::clone(void) const {
+UppercaseTransliterator* UppercaseTransliterator::clone() const {
return new UppercaseTransliterator(*this);
}
diff --git a/icu4c/source/i18n/toupptrn.h b/icu4c/source/i18n/toupptrn.h
index 677a04e..e96ca8f 100644
--- a/icu4c/source/i18n/toupptrn.h
+++ b/icu4c/source/i18n/toupptrn.h
@@ -50,7 +50,7 @@
* Transliterator API.
* @return a copy of the object.
*/
- virtual Transliterator* clone(void) const;
+ virtual UppercaseTransliterator* clone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/tzfmt.cpp b/icu4c/source/i18n/tzfmt.cpp
index c16fb59..f87f0f6 100644
--- a/icu4c/source/i18n/tzfmt.cpp
+++ b/icu4c/source/i18n/tzfmt.cpp
@@ -505,7 +505,7 @@
return isEqual;
}
-Format*
+TimeZoneFormat*
TimeZoneFormat::clone() const {
return new TimeZoneFormat(*this);
}
diff --git a/icu4c/source/i18n/tznames.cpp b/icu4c/source/i18n/tznames.cpp
index 50d7a66..d789c12 100644
--- a/icu4c/source/i18n/tznames.cpp
+++ b/icu4c/source/i18n/tznames.cpp
@@ -106,7 +106,7 @@
virtual UBool operator==(const TimeZoneNames& other) const;
virtual UBool operator!=(const TimeZoneNames& other) const {return !operator==(other);}
- virtual TimeZoneNames* clone() const;
+ virtual TimeZoneNamesDelegate* clone() const;
StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const;
StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const;
@@ -233,7 +233,7 @@
return FALSE;
}
-TimeZoneNames*
+TimeZoneNamesDelegate*
TimeZoneNamesDelegate::clone() const {
TimeZoneNamesDelegate* other = new TimeZoneNamesDelegate();
if (other != NULL) {
diff --git a/icu4c/source/i18n/tznames_impl.cpp b/icu4c/source/i18n/tznames_impl.cpp
index d92f5fb..186aaaf 100644
--- a/icu4c/source/i18n/tznames_impl.cpp
+++ b/icu4c/source/i18n/tznames_impl.cpp
@@ -1113,7 +1113,7 @@
return FALSE;
}
-TimeZoneNames*
+TimeZoneNamesImpl*
TimeZoneNamesImpl::clone() const {
UErrorCode status = U_ZERO_ERROR;
return new TimeZoneNamesImpl(fLocale, status);
@@ -2165,7 +2165,7 @@
return FALSE;
}
-TimeZoneNames*
+TZDBTimeZoneNames*
TZDBTimeZoneNames::clone() const {
return new TZDBTimeZoneNames(fLocale);
}
diff --git a/icu4c/source/i18n/tznames_impl.h b/icu4c/source/i18n/tznames_impl.h
index 4db036e..1286eeb 100644
--- a/icu4c/source/i18n/tznames_impl.h
+++ b/icu4c/source/i18n/tznames_impl.h
@@ -174,7 +174,7 @@
virtual ~TimeZoneNamesImpl();
virtual UBool operator==(const TimeZoneNames& other) const;
- virtual TimeZoneNames* clone() const;
+ virtual TimeZoneNamesImpl* clone() const;
StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const;
StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const;
@@ -236,7 +236,7 @@
virtual ~TZDBTimeZoneNames();
virtual UBool operator==(const TimeZoneNames& other) const;
- virtual TimeZoneNames* clone() const;
+ virtual TZDBTimeZoneNames* clone() const;
StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const;
StringEnumeration* getAvailableMetaZoneIDs(const UnicodeString& tzID, UErrorCode& status) const;
diff --git a/icu4c/source/i18n/tzrule.cpp b/icu4c/source/i18n/tzrule.cpp
index f4ede7c..759a2d4 100644
--- a/icu4c/source/i18n/tzrule.cpp
+++ b/icu4c/source/i18n/tzrule.cpp
@@ -108,7 +108,7 @@
}
InitialTimeZoneRule*
-InitialTimeZoneRule::clone(void) const {
+InitialTimeZoneRule::clone() const {
return new InitialTimeZoneRule(*this);
}
diff --git a/icu4c/source/i18n/unesctrn.cpp b/icu4c/source/i18n/unesctrn.cpp
index 86c55d1..0636fe1 100644
--- a/icu4c/source/i18n/unesctrn.cpp
+++ b/icu4c/source/i18n/unesctrn.cpp
@@ -164,7 +164,7 @@
/**
* Transliterator API.
*/
-Transliterator* UnescapeTransliterator::clone() const {
+UnescapeTransliterator* UnescapeTransliterator::clone() const {
return new UnescapeTransliterator(*this);
}
diff --git a/icu4c/source/i18n/unesctrn.h b/icu4c/source/i18n/unesctrn.h
index e8e171f..57dd8d3 100644
--- a/icu4c/source/i18n/unesctrn.h
+++ b/icu4c/source/i18n/unesctrn.h
@@ -77,7 +77,7 @@
/**
* Transliterator API.
*/
- virtual Transliterator* clone() const;
+ virtual UnescapeTransliterator* clone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/uni2name.cpp b/icu4c/source/i18n/uni2name.cpp
index a56f1a6..41d5c93 100644
--- a/icu4c/source/i18n/uni2name.cpp
+++ b/icu4c/source/i18n/uni2name.cpp
@@ -60,7 +60,7 @@
/**
* Transliterator API.
*/
-Transliterator* UnicodeNameTransliterator::clone(void) const {
+UnicodeNameTransliterator* UnicodeNameTransliterator::clone() const {
return new UnicodeNameTransliterator(*this);
}
diff --git a/icu4c/source/i18n/uni2name.h b/icu4c/source/i18n/uni2name.h
index 4d6eaa0..99309c8 100644
--- a/icu4c/source/i18n/uni2name.h
+++ b/icu4c/source/i18n/uni2name.h
@@ -48,7 +48,7 @@
/**
* Transliterator API.
*/
- virtual Transliterator* clone(void) const;
+ virtual UnicodeNameTransliterator* clone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/unicode/calendar.h b/icu4c/source/i18n/unicode/calendar.h
index fd86be3..6d9d1e4 100644
--- a/icu4c/source/i18n/unicode/calendar.h
+++ b/icu4c/source/i18n/unicode/calendar.h
@@ -289,7 +289,7 @@
* @return a polymorphic copy of this calendar.
* @stable ICU 2.0
*/
- virtual Calendar* clone(void) const = 0;
+ virtual Calendar* clone() const = 0;
/**
* Creates a Calendar using the default timezone and locale. Clients are responsible
diff --git a/icu4c/source/i18n/unicode/choicfmt.h b/icu4c/source/i18n/unicode/choicfmt.h
index 67a9d93..54c2e13 100644
--- a/icu4c/source/i18n/unicode/choicfmt.h
+++ b/icu4c/source/i18n/unicode/choicfmt.h
@@ -250,7 +250,7 @@
* @return a copy of this object
* @deprecated ICU 49 Use MessageFormat instead, with plural and select arguments.
*/
- virtual Format* clone(void) const;
+ virtual ChoiceFormat* clone() const;
/**
* Returns true if the given Format objects are semantically equal.
diff --git a/icu4c/source/i18n/unicode/coll.h b/icu4c/source/i18n/unicode/coll.h
index f105bda..861bd5c 100644
--- a/icu4c/source/i18n/unicode/coll.h
+++ b/icu4c/source/i18n/unicode/coll.h
@@ -267,7 +267,7 @@
* @return a copy of this object, owned by the caller
* @stable ICU 2.0
*/
- virtual Collator* clone(void) const = 0;
+ virtual Collator* clone() const = 0;
/**
* Creates the Collator object for the current default locale.
@@ -981,7 +981,7 @@
* @see clone()
* @deprecated ICU 50 no need to have two methods for cloning
*/
- virtual Collator* safeClone(void) const;
+ virtual Collator* safeClone() const;
/**
* Get the sort key as an array of bytes from a UnicodeString.
diff --git a/icu4c/source/i18n/unicode/compactdecimalformat.h b/icu4c/source/i18n/unicode/compactdecimalformat.h
index aad8070..9c1e200 100644
--- a/icu4c/source/i18n/unicode/compactdecimalformat.h
+++ b/icu4c/source/i18n/unicode/compactdecimalformat.h
@@ -105,7 +105,7 @@
* @return a polymorphic copy of this CompactDecimalFormat.
* @stable ICU 51
*/
- Format* clone() const U_OVERRIDE;
+ CompactDecimalFormat* clone() const U_OVERRIDE;
using DecimalFormat::format;
diff --git a/icu4c/source/i18n/unicode/curramt.h b/icu4c/source/i18n/unicode/curramt.h
index 18fd3b9..5cfe1cf 100644
--- a/icu4c/source/i18n/unicode/curramt.h
+++ b/icu4c/source/i18n/unicode/curramt.h
@@ -81,7 +81,7 @@
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual UObject* clone() const;
+ virtual CurrencyAmount* clone() const;
/**
* Destructor
diff --git a/icu4c/source/i18n/unicode/currunit.h b/icu4c/source/i18n/unicode/currunit.h
index f923264..d536e2f 100644
--- a/icu4c/source/i18n/unicode/currunit.h
+++ b/icu4c/source/i18n/unicode/currunit.h
@@ -96,7 +96,7 @@
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual UObject* clone() const;
+ virtual CurrencyUnit* clone() const;
/**
* Destructor
diff --git a/icu4c/source/i18n/unicode/decimfmt.h b/icu4c/source/i18n/unicode/decimfmt.h
index 13d7b79..c70603d 100644
--- a/icu4c/source/i18n/unicode/decimfmt.h
+++ b/icu4c/source/i18n/unicode/decimfmt.h
@@ -899,7 +899,7 @@
* @return a polymorphic copy of this DecimalFormat.
* @stable ICU 2.0
*/
- Format* clone(void) const U_OVERRIDE;
+ DecimalFormat* clone() const U_OVERRIDE;
/**
* Return true if the given Format objects are semantically equal.
diff --git a/icu4c/source/i18n/unicode/dtitvfmt.h b/icu4c/source/i18n/unicode/dtitvfmt.h
index 3afb9c4..23fc02e 100644
--- a/icu4c/source/i18n/unicode/dtitvfmt.h
+++ b/icu4c/source/i18n/unicode/dtitvfmt.h
@@ -434,7 +434,7 @@
* @return A copy of the object.
* @stable ICU 4.0
*/
- virtual Format* clone(void) const;
+ virtual DateIntervalFormat* clone() const;
/**
* Return true if the given Format objects are semantically equal. Objects
diff --git a/icu4c/source/i18n/unicode/dtitvinf.h b/icu4c/source/i18n/unicode/dtitvinf.h
index cfa0d8e..a894d12 100644
--- a/icu4c/source/i18n/unicode/dtitvinf.h
+++ b/icu4c/source/i18n/unicode/dtitvinf.h
@@ -197,7 +197,7 @@
* @return a copy of the object
* @stable ICU 4.0
*/
- virtual DateIntervalInfo* clone(void) const;
+ virtual DateIntervalInfo* clone() const;
/**
* Destructor.
diff --git a/icu4c/source/i18n/unicode/dtrule.h b/icu4c/source/i18n/unicode/dtrule.h
index 66afdb8..adab896 100644
--- a/icu4c/source/i18n/unicode/dtrule.h
+++ b/icu4c/source/i18n/unicode/dtrule.h
@@ -128,7 +128,7 @@
* @return A copy of the object.
* @stable ICU 3.8
*/
- DateTimeRule* clone(void) const;
+ DateTimeRule* clone() const;
/**
* Assignment operator.
diff --git a/icu4c/source/i18n/unicode/gregocal.h b/icu4c/source/i18n/unicode/gregocal.h
index 8bfb8f4..9249b59 100644
--- a/icu4c/source/i18n/unicode/gregocal.h
+++ b/icu4c/source/i18n/unicode/gregocal.h
@@ -303,7 +303,7 @@
* @return return a polymorphic copy of this calendar.
* @stable ICU 2.0
*/
- virtual Calendar* clone(void) const;
+ virtual GregorianCalendar* clone() const;
/**
* Sets the GregorianCalendar change date. This is the point when the switch from
diff --git a/icu4c/source/i18n/unicode/measfmt.h b/icu4c/source/i18n/unicode/measfmt.h
index a41aa88..df79c0f 100644
--- a/icu4c/source/i18n/unicode/measfmt.h
+++ b/icu4c/source/i18n/unicode/measfmt.h
@@ -153,7 +153,7 @@
* Clones this object polymorphically.
* @stable ICU 53
*/
- virtual Format *clone() const;
+ virtual MeasureFormat *clone() const;
/**
* Formats object to produce a string.
diff --git a/icu4c/source/i18n/unicode/measunit.h b/icu4c/source/i18n/unicode/measunit.h
index 0c04980..8ec3367 100644
--- a/icu4c/source/i18n/unicode/measunit.h
+++ b/icu4c/source/i18n/unicode/measunit.h
@@ -64,7 +64,7 @@
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual UObject* clone() const;
+ virtual MeasureUnit* clone() const;
/**
* Destructor
diff --git a/icu4c/source/i18n/unicode/measure.h b/icu4c/source/i18n/unicode/measure.h
index ea17a70..fa9c293 100644
--- a/icu4c/source/i18n/unicode/measure.h
+++ b/icu4c/source/i18n/unicode/measure.h
@@ -74,7 +74,7 @@
* have the same class as returned by getDynamicClassID().
* @stable ICU 3.0
*/
- virtual UObject* clone() const;
+ virtual Measure* clone() const;
/**
* Destructor
diff --git a/icu4c/source/i18n/unicode/msgfmt.h b/icu4c/source/i18n/unicode/msgfmt.h
index e3db8e8..99b0eae 100644
--- a/icu4c/source/i18n/unicode/msgfmt.h
+++ b/icu4c/source/i18n/unicode/msgfmt.h
@@ -420,7 +420,7 @@
* result and should delete it when done.
* @stable ICU 2.0
*/
- virtual Format* clone(void) const;
+ virtual MessageFormat* clone() const;
/**
* Returns true if the given Format objects are semantically equal.
@@ -1089,7 +1089,7 @@
class U_I18N_API DummyFormat : public Format {
public:
virtual UBool operator==(const Format&) const;
- virtual Format* clone() const;
+ virtual DummyFormat* clone() const;
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
UErrorCode& status) const;
diff --git a/icu4c/source/i18n/unicode/nounit.h b/icu4c/source/i18n/unicode/nounit.h
index de33fbb..e1da7c5 100644
--- a/icu4c/source/i18n/unicode/nounit.h
+++ b/icu4c/source/i18n/unicode/nounit.h
@@ -74,7 +74,7 @@
* have the same class as returned by getDynamicClassID().
* @draft ICU 60
*/
- virtual UObject* clone() const;
+ virtual NoUnit* clone() const;
/**
* Returns a unique class ID for this object POLYMORPHICALLY.
diff --git a/icu4c/source/i18n/unicode/plurfmt.h b/icu4c/source/i18n/unicode/plurfmt.h
index 1900b18..fb9a433 100644
--- a/icu4c/source/i18n/unicode/plurfmt.h
+++ b/icu4c/source/i18n/unicode/plurfmt.h
@@ -450,7 +450,7 @@
* result and should delete it when done.
* @stable ICU 4.0
*/
- virtual Format* clone(void) const;
+ virtual PluralFormat* clone() const;
/**
* Formats a plural message for a number taken from a Formattable object.
diff --git a/icu4c/source/i18n/unicode/rbnf.h b/icu4c/source/i18n/unicode/rbnf.h
index a7c543e..62b0232 100644
--- a/icu4c/source/i18n/unicode/rbnf.h
+++ b/icu4c/source/i18n/unicode/rbnf.h
@@ -698,7 +698,7 @@
* @return A copy of the object.
* @stable ICU 2.6
*/
- virtual Format* clone(void) const;
+ virtual RuleBasedNumberFormat* clone() const;
/**
* Return true if the given Format objects are semantically equal.
diff --git a/icu4c/source/i18n/unicode/rbtz.h b/icu4c/source/i18n/unicode/rbtz.h
index 3884a97..56d6f1c 100644
--- a/icu4c/source/i18n/unicode/rbtz.h
+++ b/icu4c/source/i18n/unicode/rbtz.h
@@ -123,7 +123,7 @@
* @return A new copy of this TimeZone object.
* @stable ICU 3.8
*/
- virtual TimeZone* clone(void) const;
+ virtual RuleBasedTimeZone* clone() const;
/**
* Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
diff --git a/icu4c/source/i18n/unicode/scientificnumberformatter.h b/icu4c/source/i18n/unicode/scientificnumberformatter.h
index cd358dc..7f860d4 100644
--- a/icu4c/source/i18n/unicode/scientificnumberformatter.h
+++ b/icu4c/source/i18n/unicode/scientificnumberformatter.h
@@ -159,7 +159,7 @@
class U_I18N_API SuperscriptStyle : public Style {
public:
- virtual Style *clone() const;
+ virtual SuperscriptStyle *clone() const;
protected:
virtual UnicodeString &format(
const UnicodeString &original,
@@ -177,7 +177,7 @@
: Style(),
fBeginMarkup(beginMarkup),
fEndMarkup(endMarkup) { }
- virtual Style *clone() const;
+ virtual MarkupStyle *clone() const;
protected:
virtual UnicodeString &format(
const UnicodeString &original,
diff --git a/icu4c/source/i18n/unicode/selfmt.h b/icu4c/source/i18n/unicode/selfmt.h
index f30aab0..9b98f6d 100755
--- a/icu4c/source/i18n/unicode/selfmt.h
+++ b/icu4c/source/i18n/unicode/selfmt.h
@@ -275,7 +275,7 @@
* result and should delete it when done.
* @stable ICU 4.4
*/
- virtual Format* clone(void) const;
+ virtual SelectFormat* clone() const;
/**
* Format an object to produce a string.
diff --git a/icu4c/source/i18n/unicode/simpletz.h b/icu4c/source/i18n/unicode/simpletz.h
index 34263b6..f8e2a74 100644
--- a/icu4c/source/i18n/unicode/simpletz.h
+++ b/icu4c/source/i18n/unicode/simpletz.h
@@ -705,7 +705,7 @@
* @return A new copy of this TimeZone object.
* @stable ICU 2.0
*/
- virtual TimeZone* clone(void) const;
+ virtual SimpleTimeZone* clone() const;
/**
* Gets the first time zone transition after the base time.
diff --git a/icu4c/source/i18n/unicode/smpdtfmt.h b/icu4c/source/i18n/unicode/smpdtfmt.h
index e7299cb..8a7a176 100644
--- a/icu4c/source/i18n/unicode/smpdtfmt.h
+++ b/icu4c/source/i18n/unicode/smpdtfmt.h
@@ -867,7 +867,7 @@
* @return A copy of the object.
* @stable ICU 2.0
*/
- virtual Format* clone(void) const;
+ virtual SimpleDateFormat* clone() const;
/**
* Return true if the given Format objects are semantically equal. Objects
diff --git a/icu4c/source/i18n/unicode/stsearch.h b/icu4c/source/i18n/unicode/stsearch.h
index 410495f..7ca93f0 100644
--- a/icu4c/source/i18n/unicode/stsearch.h
+++ b/icu4c/source/i18n/unicode/stsearch.h
@@ -414,7 +414,7 @@
* @return cloned object
* @stable ICU 2.0
*/
- virtual SearchIterator * safeClone(void) const;
+ virtual StringSearch * safeClone() const;
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
diff --git a/icu4c/source/i18n/unicode/tblcoll.h b/icu4c/source/i18n/unicode/tblcoll.h
index 35adba8..c4471b0 100644
--- a/icu4c/source/i18n/unicode/tblcoll.h
+++ b/icu4c/source/i18n/unicode/tblcoll.h
@@ -230,7 +230,7 @@
* @return a copy of this object, owned by the caller
* @stable ICU 2.0
*/
- virtual Collator* clone(void) const;
+ virtual RuleBasedCollator* clone() const;
/**
* Creates a collation element iterator for the source string. The caller of
diff --git a/icu4c/source/i18n/unicode/timezone.h b/icu4c/source/i18n/unicode/timezone.h
index badd26c..5c361e7 100644
--- a/icu4c/source/i18n/unicode/timezone.h
+++ b/icu4c/source/i18n/unicode/timezone.h
@@ -754,7 +754,7 @@
* @return A new copy of this TimeZone object.
* @stable ICU 2.0
*/
- virtual TimeZone* clone(void) const = 0;
+ virtual TimeZone* clone() const = 0;
/**
* Return the class ID for this class. This is useful only for
diff --git a/icu4c/source/i18n/unicode/tmunit.h b/icu4c/source/i18n/unicode/tmunit.h
index 2c4d9da..2e949dd 100644
--- a/icu4c/source/i18n/unicode/tmunit.h
+++ b/icu4c/source/i18n/unicode/tmunit.h
@@ -73,7 +73,7 @@
* Override clone.
* @stable ICU 4.2
*/
- virtual UObject* clone() const;
+ virtual TimeUnit* clone() const;
/**
* Copy operator.
diff --git a/icu4c/source/i18n/unicode/tmutamt.h b/icu4c/source/i18n/unicode/tmutamt.h
index b540996..8bcc684 100644
--- a/icu4c/source/i18n/unicode/tmutamt.h
+++ b/icu4c/source/i18n/unicode/tmutamt.h
@@ -87,7 +87,7 @@
* @return a polymorphic clone of this object. The result will have the same class as returned by getDynamicClassID().
* @stable ICU 4.2
*/
- virtual UObject* clone() const;
+ virtual TimeUnitAmount* clone() const;
/**
diff --git a/icu4c/source/i18n/unicode/tmutfmt.h b/icu4c/source/i18n/unicode/tmutfmt.h
index b92029c..82be597 100644
--- a/icu4c/source/i18n/unicode/tmutfmt.h
+++ b/icu4c/source/i18n/unicode/tmutfmt.h
@@ -126,7 +126,7 @@
* @return A copy of the object.
* @deprecated ICU 53
*/
- virtual Format* clone(void) const;
+ virtual TimeUnitFormat* clone() const;
/**
* Assignment operator
diff --git a/icu4c/source/i18n/unicode/tzfmt.h b/icu4c/source/i18n/unicode/tzfmt.h
index 070fcd3..6d3863b 100644
--- a/icu4c/source/i18n/unicode/tzfmt.h
+++ b/icu4c/source/i18n/unicode/tzfmt.h
@@ -307,7 +307,7 @@
* @return A copy of the object
* @stable ICU 50
*/
- virtual Format* clone() const;
+ virtual TimeZoneFormat* clone() const;
/**
* Creates an instance of <code>TimeZoneFormat</code> for the given locale.
diff --git a/icu4c/source/i18n/unicode/tzrule.h b/icu4c/source/i18n/unicode/tzrule.h
index 6cce299..795806d 100644
--- a/icu4c/source/i18n/unicode/tzrule.h
+++ b/icu4c/source/i18n/unicode/tzrule.h
@@ -47,7 +47,7 @@
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual TimeZoneRule* clone(void) const = 0;
+ virtual TimeZoneRule* clone() const = 0;
/**
* Return true if the given <code>TimeZoneRule</code> objects are semantically equal. Objects
@@ -231,7 +231,7 @@
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual InitialTimeZoneRule* clone(void) const;
+ virtual InitialTimeZoneRule* clone() const;
/**
* Assignment operator.
@@ -442,7 +442,7 @@
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual AnnualTimeZoneRule* clone(void) const;
+ virtual AnnualTimeZoneRule* clone() const;
/**
* Assignment operator.
@@ -658,7 +658,7 @@
* @return A copy of the object.
* @stable ICU 3.8
*/
- virtual TimeArrayTimeZoneRule* clone(void) const;
+ virtual TimeArrayTimeZoneRule* clone() const;
/**
* Assignment operator.
diff --git a/icu4c/source/i18n/unicode/tztrans.h b/icu4c/source/i18n/unicode/tztrans.h
index 34f9a91..217d711 100644
--- a/icu4c/source/i18n/unicode/tztrans.h
+++ b/icu4c/source/i18n/unicode/tztrans.h
@@ -70,7 +70,7 @@
* @return A copy of the object.
* @stable ICU 3.8
*/
- TimeZoneTransition* clone(void) const;
+ TimeZoneTransition* clone() const;
/**
* Assignment operator.
diff --git a/icu4c/source/i18n/unicode/vtzone.h b/icu4c/source/i18n/unicode/vtzone.h
index f240090..32e22b2 100644
--- a/icu4c/source/i18n/unicode/vtzone.h
+++ b/icu4c/source/i18n/unicode/vtzone.h
@@ -187,7 +187,7 @@
* @return A new copy of this TimeZone object.
* @stable ICU 3.8
*/
- virtual TimeZone* clone(void) const;
+ virtual VTimeZone* clone() const;
/**
* Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
diff --git a/icu4c/source/i18n/vtzone.cpp b/icu4c/source/i18n/vtzone.cpp
index cb84c62..7308693 100644
--- a/icu4c/source/i18n/vtzone.cpp
+++ b/icu4c/source/i18n/vtzone.cpp
@@ -1177,8 +1177,8 @@
writeSimple(time, writer, status);
}
-TimeZone*
-VTimeZone::clone(void) const {
+VTimeZone*
+VTimeZone::clone() const {
return new VTimeZone(*this);
}
diff --git a/icu4c/source/i18n/windtfmt.cpp b/icu4c/source/i18n/windtfmt.cpp
index 6a3779a..bcf272b 100644
--- a/icu4c/source/i18n/windtfmt.cpp
+++ b/icu4c/source/i18n/windtfmt.cpp
@@ -213,7 +213,7 @@
return *this;
}
-Format *Win32DateFormat::clone(void) const
+Win32DateFormat *Win32DateFormat::clone() const
{
return new Win32DateFormat(*this);
}
diff --git a/icu4c/source/i18n/windtfmt.h b/icu4c/source/i18n/windtfmt.h
index 3306905..7fe7f68 100644
--- a/icu4c/source/i18n/windtfmt.h
+++ b/icu4c/source/i18n/windtfmt.h
@@ -48,7 +48,7 @@
virtual ~Win32DateFormat();
- virtual Format *clone(void) const;
+ virtual Win32DateFormat *clone() const;
Win32DateFormat &operator=(const Win32DateFormat &other);
diff --git a/icu4c/source/i18n/winnmfmt.cpp b/icu4c/source/i18n/winnmfmt.cpp
index 5637a0f..72da1be 100644
--- a/icu4c/source/i18n/winnmfmt.cpp
+++ b/icu4c/source/i18n/winnmfmt.cpp
@@ -294,7 +294,7 @@
return *this;
}
-Format *Win32NumberFormat::clone(void) const
+Win32NumberFormat *Win32NumberFormat::clone() const
{
return new Win32NumberFormat(*this);
}
diff --git a/icu4c/source/i18n/winnmfmt.h b/icu4c/source/i18n/winnmfmt.h
index 6139c1f..99571d2 100644
--- a/icu4c/source/i18n/winnmfmt.h
+++ b/icu4c/source/i18n/winnmfmt.h
@@ -44,7 +44,7 @@
virtual ~Win32NumberFormat();
- virtual Format *clone(void) const;
+ virtual Win32NumberFormat *clone() const;
Win32NumberFormat &operator=(const Win32NumberFormat &other);
diff --git a/icu4c/source/test/intltest/apicoll.cpp b/icu4c/source/test/intltest/apicoll.cpp
index 37ce414..a8ee961 100644
--- a/icu4c/source/test/intltest/apicoll.cpp
+++ b/icu4c/source/test/intltest/apicoll.cpp
@@ -2000,7 +2000,7 @@
class TestCollator : public Collator
{
public:
- virtual Collator* clone(void) const;
+ virtual TestCollator* clone() const;
using Collator::compare;
@@ -2065,7 +2065,7 @@
// (compare this vs. o's subclass fields)
}
-Collator* TestCollator::clone() const
+TestCollator* TestCollator::clone() const
{
return new TestCollator();
}
diff --git a/icu4c/source/test/intltest/citrtest.cpp b/icu4c/source/test/intltest/citrtest.cpp
index 375b3c1..e1fed1c 100644
--- a/icu4c/source/test/intltest/citrtest.cpp
+++ b/icu4c/source/test/intltest/citrtest.cpp
@@ -57,7 +57,7 @@
return TRUE;
}
- virtual CharacterIterator* clone(void) const {
+ virtual SCharacterIterator* clone(void) const {
return NULL;
}
virtual int32_t hashCode(void) const{
diff --git a/icu4c/source/test/intltest/transtst.cpp b/icu4c/source/test/intltest/transtst.cpp
index 5e84c8b..303f811 100644
--- a/icu4c/source/test/intltest/transtst.cpp
+++ b/icu4c/source/test/intltest/transtst.cpp
@@ -1947,7 +1947,7 @@
public:
TestTrans(const UnicodeString& id) : Transliterator(id, 0) {
}
- virtual Transliterator* clone(void) const {
+ virtual TestTrans* clone(void) const {
return new TestTrans(getID());
}
virtual void handleTransliterate(Replaceable& /*text*/, UTransPosition& offsets,