diff --git a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h index 6f6a1df..dafd9ad 100644 --- a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h +++ b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/views/MenuHelper.h @@ -1489,7 +1489,7 @@ inline bool verifyAllPaymentsCompleted(Controller& m_controller) { throw std::runtime_error("No authenticated user found."); } - std::string authenticatedUserId = authenticatedUser->getId(); + const std::string& authenticatedUserId = authenticatedUser->getId(); util::Map listOfInvoices = m_controller.getAllInvoices(); for (int invoiceIndex = 0; invoiceIndex < listOfInvoices.getSize(); ++invoiceIndex) { @@ -1498,7 +1498,7 @@ inline bool verifyAllPaymentsCompleted(Controller& m_controller) { continue; } - std::string customerId = invoice->getBooking()->getCustomerId(); + const std::string& customerId = invoice->getBooking()->getCustomerId(); if (customerId == authenticatedUserId) { if (invoice->getStatus() != util::PaymentStatus::COMPLETED)