diff options
Diffstat (limited to 'src/company_gui.cpp')
-rw-r--r-- | src/company_gui.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 7b153196d..3f977333c 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -76,11 +76,18 @@ struct ExpensesList { const ExpensesType *et; ///< Expenses items. const int length; ///< Number of items in list. const int height; ///< Height of list, 10 pixels per item, plus an additional 12 pixels per subtotal. */ + + ExpensesList(ExpensesType *et, int length, int height) : + et(et), + length(length), + height(height) + { + } }; static const ExpensesList _expenses_list_types[] = { - { _expenses_list_1, lengthof(_expenses_list_1), lengthof(_expenses_list_1) * 10 }, - { _expenses_list_2, lengthof(_expenses_list_2), lengthof(_expenses_list_2) * 10 + 3 * 12 }, + ExpensesList(_expenses_list_1, lengthof(_expenses_list_1), lengthof(_expenses_list_1) * 10), + ExpensesList(_expenses_list_2, lengthof(_expenses_list_2), lengthof(_expenses_list_2) * 10 + 3 * 12), }; /** Widgets of the company finances windows. */ |