Exemple #1
0
def ShouldInlineStruct(struct):
    # TODO(darin): Base this on the size of the wrapper class.
    if len(struct.fields) > 4:
        return False
    for field in struct.fields:
        if mojom.IsMoveOnlyKind(field.kind):
            return False
    return True
Exemple #2
0
def ShouldInlineUnion(union):
    return not any(mojom.IsMoveOnlyKind(field.kind) for field in union.fields)