diff --git a/docs/changelog.md b/docs/changelog.md index ed2f49c1..e87487aa 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -7,6 +7,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added +- **🚀 Recommendations for Modern POS Transformation (2026-01-24)** + - **Phase 1: Complete Current Modernization (1-2 months)** + - **1.1 Finish C++23 String Migration** + - Status: ~97% complete (14/318 calls modernized) + - Remaining: 14 sprintf/snprintf calls in 5 files (mostly comments/includes) + - Priority files: main/hardware/printer.cc (1 call) - COMPLETED + - Recommendation: Use the existing modernize_cpp23.sh to systematically convert remaining sprintf/snprintf calls to format_to_buffer(). + - **1.2 Expand Test Coverage** + - Current: 14 test files, ~671 assertions + - Target areas: Payment processing (credit.cc, check.cc), Data serialization/deserialization, Hardware interface mocking, UI zone logic + - **Root Cause**: Ongoing modernization effort to improve code safety, maintainability, and test coverage + - **Solution**: Systematic completion of C++23 migration and test expansion + - **Impact**: Enhanced code quality, security, and reliability for production deployment + - **Split Check Interface: Complete Redesign for Simplicity and Functionality (2026-01-20)** - Comprehensive redesign of the split check interface focusing on simplicity, functionality, and improved user experience - **Changes Made**: diff --git a/main/hardware/printer.cc b/main/hardware/printer.cc index 9ce26b23..461d626e 100644 --- a/main/hardware/printer.cc +++ b/main/hardware/printer.cc @@ -404,7 +404,7 @@ void Printer::CloseAsync() { // LPD printing char cmd[512]; - snprintf(cmd, sizeof(cmd), "cat %s | /usr/bin/lpr -P%s", + vt::cpp23::format_to_buffer(cmd, sizeof(cmd), "cat {} | /usr/bin/lpr -P{}", temp_file.c_str(), target_str.c_str()); int result = system(cmd); if (result != 0)