Geert Janssens <[email protected]> writes:
> +gboolean gncInvoiceAmountPositive (GncInvoice *invoice)
> +{
> + switch (gncInvoiceGetType (invoice))
> + {
> + case GNC_INVOICE_CUST_INVOICE:
> + case GNC_INVOICE_VEND_CREDIT_NOTE:
> + case GNC_INVOICE_EMPL_CREDIT_NOTE:
> + return TRUE;
> + case GNC_INVOICE_CUST_CREDIT_NOTE:
> + case GNC_INVOICE_VEND_INVOICE:
> + case GNC_INVOICE_EMPL_INVOICE:
I think that GNC_INVOICE_UNDEFINED below here should be part of the
default case, and I think there should be a g_assert() as well to signal
that there's a bug that this switch statement doesn't contain everything
or there was invalid input.
> + case GNC_INVOICE_UNDEFINED:
> + return FALSE;
> + default:
> + return FALSE;
> + }
> +}
> +
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
[email protected] PGP key available
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel