-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Calculator should use constexpr when defining static const strings #55
Copy link
Copy link
Closed
Labels
Pri: 2codebase qualityIssues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability)Issues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability)help wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunities
Description
Many strings in Calculator should not be modified and so we declare them 'static const'. This is fine for ensuring compiler-enforced const-ness, but a downside to this approach is that the strings aren't created until runtime. We can improve this by marking the strings with 'constexpr'. This will tell the compiler to bake the strings into the binary itself, which results in less overhead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Pri: 2codebase qualityIssues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability)Issues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability)help wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunities