r21412 - gnucash/trunk/src/engine - Assert that the invoice type is never an unknown type.
Geert Janssens
gjanssens at code.gnucash.org
Mon Oct 10 11:31:21 EDT 2011
Author: gjanssens
Date: 2011-10-10 11:31:21 -0400 (Mon, 10 Oct 2011)
New Revision: 21412
Trac: http://svn.gnucash.org/trac/changeset/21412
Modified:
gnucash/trunk/src/engine/gncInvoice.c
Log:
Assert that the invoice type is never an unknown type.
Modified: gnucash/trunk/src/engine/gncInvoice.c
===================================================================
--- gnucash/trunk/src/engine/gncInvoice.c 2011-10-10 12:34:58 UTC (rev 21411)
+++ gnucash/trunk/src/engine/gncInvoice.c 2011-10-10 15:31:21 UTC (rev 21412)
@@ -1165,9 +1165,12 @@
case GNC_INVOICE_CUST_CREDIT_NOTE:
case GNC_INVOICE_VEND_INVOICE:
case GNC_INVOICE_EMPL_INVOICE:
+ return FALSE;
case GNC_INVOICE_UNDEFINED:
- return FALSE;
default:
+ /* Should never be reached.
+ * If it is, perhaps a new value is added to GncInvoiceType ? */
+ g_assert_not_reached();
return FALSE;
}
}
More information about the gnucash-changes
mailing list