ICU-12617 Remove duplicate free. Memory check is clean
X-SVN-Rev: 39063
This commit is contained in:
parent
7c79fa85ac
commit
d17f99dd61
@ -23,7 +23,6 @@
|
||||
#include "unicode/brkiter.h"
|
||||
|
||||
#include "cmemory.h"
|
||||
#include "cstr.h"
|
||||
#include "uresimp.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
@ -449,14 +448,13 @@ RelativeDateFormat::initCapitalizationContextInfo(const Locale& thelocale)
|
||||
const char * localeID = (thelocale != NULL)? thelocale.getBaseName(): NULL;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
LocalUResourceBundlePointer rb(ures_open(NULL, localeID, &status));
|
||||
// TODO: Cleanup
|
||||
// UResourceBundle *rb = ures_open(NULL, localeID, &status);
|
||||
LocalUResourceBundlePointer relBundle(ures_getByKeyWithFallback(rb.getAlias(),
|
||||
"contextTransforms/relative",
|
||||
rb.getAlias(), &status));
|
||||
ures_getByKeyWithFallback(rb.getAlias(),
|
||||
"contextTransforms/relative",
|
||||
rb.getAlias(), &status);
|
||||
if (U_SUCCESS(status) && rb != NULL) {
|
||||
int32_t len = 0;
|
||||
const int32_t * intVector = ures_getIntVector(relBundle.getAlias(), &len, &status);
|
||||
const int32_t * intVector = ures_getIntVector(rb.getAlias(),
|
||||
&len, &status);
|
||||
if (U_SUCCESS(status) && intVector != NULL && len >= 2) {
|
||||
fCapitalizationOfRelativeUnitsForUIListMenu = intVector[0];
|
||||
fCapitalizationOfRelativeUnitsForStandAlone = intVector[1];
|
||||
|
Loading…
Reference in New Issue
Block a user