mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
ICU-114 Fix compile errors
X-SVN-Rev: 196
This commit is contained in:
parent
62b6e455db
commit
37e56ce3c9
2 changed files with 11 additions and 4 deletions
|
@ -30,7 +30,8 @@ RuleBasedTransliterator::RuleBasedTransliterator(const UnicodeString& ID,
|
|||
const TransliterationRuleData* theData,
|
||||
UnicodeFilter* adoptedFilter) :
|
||||
Transliterator(ID, adoptedFilter),
|
||||
data(theData), isDataOwned(FALSE) {}
|
||||
data((TransliterationRuleData*)theData), // cast away const
|
||||
isDataOwned(FALSE) {}
|
||||
|
||||
/**
|
||||
* Copy constructor. Since the data object is immutable, we can share
|
||||
|
@ -38,12 +39,18 @@ RuleBasedTransliterator::RuleBasedTransliterator(const UnicodeString& ID,
|
|||
*/
|
||||
RuleBasedTransliterator::RuleBasedTransliterator(
|
||||
const RuleBasedTransliterator& other) :
|
||||
Transliterator(other), data(other.data) {}
|
||||
Transliterator(other), data(other.data) {
|
||||
// TODO: Finish this -- implement with correct data ownership handling
|
||||
}
|
||||
|
||||
/**
|
||||
* Destructor. We do NOT own the data object, so we do not delete it.
|
||||
*/
|
||||
RuleBasedTransliterator::~RuleBasedTransliterator() {}
|
||||
RuleBasedTransliterator::~RuleBasedTransliterator() {
|
||||
if (isDataOwned) {
|
||||
delete data;
|
||||
}
|
||||
}
|
||||
|
||||
Transliterator* // Covariant return NOT ALLOWED (for portability)
|
||||
RuleBasedTransliterator::clone() const {
|
||||
|
|
|
@ -204,7 +204,7 @@ class U_I18N_API RuleBasedTransliterator : public Transliterator {
|
|||
/**
|
||||
* If true, we own the data object and must delete it.
|
||||
*/
|
||||
bool_t dataIsOwned;
|
||||
bool_t isDataOwned;
|
||||
|
||||
public:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue