summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/imgui_extensions.cpp16
-rw-r--r--src/ui/ui_invoices.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/imgui_extensions.cpp b/src/ui/imgui_extensions.cpp
index 63e8eeb..66160ae 100644
--- a/src/ui/imgui_extensions.cpp
+++ b/src/ui/imgui_extensions.cpp
@@ -98,7 +98,7 @@ namespace ImGui
for (int i = 0; i < country::get_count(); i++)
{
- if (strcmp(country::get_code_by_index(i), buffer) == 0)
+ if (strops::equals(country::get_code_by_index(i), buffer))
{
selected_country = countries[i];
break;
@@ -256,7 +256,7 @@ namespace ImGui
{
for (u32 i = 0; i < costcenter_count; i++)
{
- if (strcmp(buffer[i].id, costcenter_id) == 0)
+ if (strops::equals(buffer[i].id, costcenter_id))
{
selected_costcenter = &buffer[i];
break;
@@ -269,7 +269,7 @@ namespace ImGui
{
for (u32 n = 0; n < costcenter_count; n++)
{
- bool is_selected = selected_costcenter && strcmp(selected_costcenter->id, buffer[n].id) == 0;
+ bool is_selected = selected_costcenter && strops::equals(selected_costcenter->id, buffer[n].id);
if (ImGui::Selectable(locale::get(buffer[n].description), is_selected)) {
selected_costcenter_index = n;
}
@@ -297,7 +297,7 @@ namespace ImGui
{
for (u32 i = 0; i < project_count; i++)
{
- if (strcmp(buffer[i].id, project_id) == 0)
+ if (strops::equals(buffer[i].id, project_id))
{
selected_project = &buffer[i];
break;
@@ -310,7 +310,7 @@ namespace ImGui
{
for (u32 n = 0; n < project_count; n++)
{
- bool is_selected = selected_project && strcmp(selected_project->id, buffer[n].id) == 0;
+ bool is_selected = selected_project && strops::equals(selected_project->id, buffer[n].id);
if (ImGui::Selectable(buffer[n].description, is_selected)) {
selected_project_index = n;
}
@@ -338,7 +338,7 @@ namespace ImGui
{
for (u32 i = 0; i < tax_rate_count; i++)
{
- if (strcmp(buffer[i].internal_code, tax_internal_code) == 0)
+ if (strops::equals(buffer[i].internal_code, tax_internal_code))
{
selected_tax_rate = &buffer[i];
break;
@@ -364,7 +364,7 @@ namespace ImGui
{
for (u32 n = 0; n < tax_rate_count; n++)
{
- bool is_selected = selected_tax_rate && strcmp(selected_tax_rate->internal_code, buffer[n].internal_code) == 0;
+ bool is_selected = selected_tax_rate && strops::equals(selected_tax_rate->internal_code, buffer[n].internal_code);
char category_code_desc[MAX_LEN_LONG_DESC];
strops::format(category_code_desc, MAX_LEN_LONG_DESC, "taxrate.code.%s", buffer[n].internal_code);
@@ -415,7 +415,7 @@ namespace ImGui
{
for (int i = 0; i < currency_count; i++)
{
- if (strcmp(currencies[i], currency) == 0)
+ if (strops::equals(currencies[i], currency))
{
currentCurrency = i;
break;
diff --git a/src/ui/ui_invoices.cpp b/src/ui/ui_invoices.cpp
index 4ae1669..277ce46 100644
--- a/src/ui/ui_invoices.cpp
+++ b/src/ui/ui_invoices.cpp
@@ -137,7 +137,7 @@ void draw_invoice_items_form(invoice* invoice, bool outgoing)
ImGui::TableSetColumnIndex(8);
ImGui::Text("%.2f %s", invoice->orig_total, invoice->currency);
- if (strcmp(invoice->currency, administration::get_default_currency()) != 0) {
+ if (!strops::equals(invoice->currency, administration::get_default_currency())) {
ImGui::TableNextRow();
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0, IM_COL32(50, 50, 50, 255));