Logo Search packages:      
Sourcecode: icu version File versions  Download package

UBool UnicodeSet::allocateStrings ( UErrorCode status  )  [private]

Allocate our strings vector and return TRUE if successful.

Definition at line 1557 of file uniset.cpp.

References FALSE, NULL, TRUE, U_FAILURE, and U_MEMORY_ALLOCATION_ERROR.

Referenced by UnicodeSet().

                                                    {
    if (U_FAILURE(status)) {
        return FALSE;
    }
    strings = new UVector(uhash_deleteUnicodeString,
                          uhash_compareUnicodeString, 1, status);
    if (strings == NULL) { // Check for memory allocation error.
        status = U_MEMORY_ALLOCATION_ERROR;
        return FALSE;
    }
    if (U_FAILURE(status)) {
        delete strings;
        strings = NULL;
        return FALSE;
    } 
    return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index