Closed jellespijker closed 11 months ago
26 tests ±0 26 :heavy_check_mark: ±0 14s :stopwatch: +4s 1 suites ±0 0 :zzz: ±0 1 files ±0 0 :x: ±0
Results for commit af234bd9. ± Comparison against base commit 535a26d9.
:recycle: This comment has been updated with latest results.
This commit introduces a new type 'string-switch' to handle string comparisons in a switch-case format. This is achieved by employing a DJB2a-based hash function to convert each string to a unique, corresponding enum value. The primary motivation behind this was to refactor the existing settings retrieval process, which was heavily reliant on long if-else constructs. By replacing these with more manageable switch statements, the code readability and maintainability is significantly improved. This change also facilitates the addition of new settings by simply extending existing enums and the related switch statements.
Contributes to CURA-10702