-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR #380: Simplify, speed-up and error-proof op<< for PartitionPolicyEnum
Using switch/case to output enum values is the best for readability and performance-wise (about 8x speed-up vs the map implementation). Also, this makes sure it is immune to future issues if the enum is extended, as the compiler will warn about a new value not handled in the switch. Signed-off-by: Henner Zeller <[email protected]> GitHub PR #380 Copybara import of the project: - aad06af Simplify, speed-up and error-proof op<< for PartitionPoli... by Henner Zeller <[email protected]> - d2f98bc Address review comments. by Henner Zeller <[email protected]> Closes #380 PiperOrigin-RevId: 325152616
- Loading branch information
Showing
2 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters