mode integers should be enums/enum classes #699

Open
opened 2025-03-19 14:46:23 +00:00 by NQNStudios · 1 comment
NQNStudios commented 2025-03-19 14:46:23 +00:00 (Migrated from github.com)

My pet peeve in the code base is how magic integers are used to specify the 'mode' of different functions. When you're reading the code, you have no idea what passing a 1 or a 0 to a function actually means. They should be enum values describing what the modes are.

My pet peeve in the code base is how magic integers are used to specify the 'mode' of different functions. When you're reading the code, you have no idea what passing a 1 or a 0 to a function actually means. They should be enum values describing what the modes are.
NQNStudios commented 2025-03-19 18:16:10 +00:00 (Migrated from github.com)

079021c shows an example of how I want to refactor these for readability.

[079021c](https://github.com/calref/cboe/pull/697/commits/079021c41dafda79b3d4cd81b91aba156b9ad1f5) shows an example of how I want to refactor these for readability.
Sign in to join this conversation.
No description provided.