UInt16List* MtpDataPacket::getAUInt16() {
	UInt16List* result = new UInt16List;
	int count = getUInt32();
	for (int i = 0; i < count; i++)
		result->push(getUInt16());
	return result;
}
Beispiel #2
0
UInt16List* MtpDataPacket::getAUInt16() {
    uint32_t count;
    if (!getUInt32(count))
        return NULL;
    UInt16List* result = new UInt16List;
    for (uint32_t i = 0; i < count; i++) {
        uint16_t value;
        if (!getUInt16(value)) {
            delete result;
            return NULL;
        }
        result->push(value);
    }
    return result;
}