summaryrefslogtreecommitdiff
path: root/src/ui/ui_invoices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_invoices.cpp')
-rw-r--r--src/ui/ui_invoices.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/ui/ui_invoices.cpp b/src/ui/ui_invoices.cpp
index 4dd44e8..850c9a3 100644
--- a/src/ui/ui_invoices.cpp
+++ b/src/ui/ui_invoices.cpp
@@ -14,19 +14,16 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define _CRT_SECURE_NO_WARNINGS
-#include <stdio.h>
#include <time.h>
+#include <ImGuiDatePicker/ImGuiDatePicker.hpp>
-#include "ImGuiDatePicker/ImGuiDatePicker.hpp"
-//#include "tinyfiledialogs/tinyfiledialogs.h"
-
-#include "strops.hpp"
#include "ui.hpp"
#include "imgui.h"
+#include "memops.hpp"
+#include "strops.hpp"
+#include "locales.hpp"
#include "administration.hpp"
#include "administration_writer.hpp"
-#include "locales.hpp"
static ui::view_state current_view_state = ui::view_state::LIST_ALL;
@@ -40,7 +37,7 @@ void draw_addressee_form_ex(delivery_info* buffer, bool viewing_only = false);
void ui::destroy_invoices()
{
- free(invoice_items_buffer);
+ memops::unalloc(invoice_items_buffer);
}
void ui::setup_invoices()
@@ -49,7 +46,7 @@ void ui::setup_invoices()
active_invoice = administration::invoice_create_empty();
u32 invoice_items_count = MAX_BILLING_ITEMS;
- invoice_items_buffer = (billing_item*)malloc(sizeof(billing_item) * invoice_items_count);
+ invoice_items_buffer = (billing_item*)memops::alloc(sizeof(billing_item) * invoice_items_count);
}
void draw_invoice_items_form(invoice* invoice)