mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
pathname cleanup
X-Trac-URL: https://ssl.icu-project.org/trac/ticket/96 git-svn-id: http://source.icu-project.org/repos/icu/icu/trunk@286 0a8b766c-62c9-45f9-954d-7f2943c9ead0
This commit is contained in:
parent
238ef22e04
commit
4c59b2b622
1 changed files with 12 additions and 2 deletions
|
@ -710,7 +710,10 @@ RuleBasedCollator::constructFromFile( const Locale& locale,
|
|||
cerr << localeFileName << kFilenameSuffix << " binary load " << errorName(status) << endl;
|
||||
#endif
|
||||
if(U_SUCCESS(status) || status == U_MEMORY_ALLOCATION_ERROR)
|
||||
return;
|
||||
{
|
||||
delete [] binaryFilePath;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Now try to load it up from a resource bundle text source file
|
||||
|
@ -718,7 +721,10 @@ RuleBasedCollator::constructFromFile( const Locale& locale,
|
|||
|
||||
// if there is no resource bundle file for the give locale, break out
|
||||
if(U_FAILURE(status))
|
||||
return;
|
||||
{
|
||||
delete [] binaryFilePath;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef COLLDEBUG
|
||||
cerr << localeFileName << " ascii load " << errorName(status) << endl;
|
||||
|
@ -732,12 +738,14 @@ RuleBasedCollator::constructFromFile( const Locale& locale,
|
|||
bundle.getString("CollationElements", colString, intStatus);
|
||||
if(colString.isBogus()) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
delete [] binaryFilePath;
|
||||
return;
|
||||
}
|
||||
|
||||
// if this bundle doesn't contain collation data, break out
|
||||
if(U_FAILURE(intStatus)) {
|
||||
status = U_MISSING_RESOURCE_ERROR;
|
||||
delete [] binaryFilePath;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -748,12 +756,14 @@ RuleBasedCollator::constructFromFile( const Locale& locale,
|
|||
colString.insert(0, DEFAULTRULES);
|
||||
if(colString.isBogus()) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
delete [] binaryFilePath;
|
||||
return;
|
||||
}
|
||||
|
||||
constructFromRules(colString, intStatus);
|
||||
if(intStatus == U_MEMORY_ALLOCATION_ERROR) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
delete [] binaryFilePath;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue