Cleanup #100
closed#define ? enum?
0%
Description
This issue corresponds to my previous "feature request".
Would you like to replace any defines for constant values by enumerations to stress their relationships?
source:src/active/common.h@cdb3582a1325e933f5b4f02ca2cea7445678c9fc#L49
source:src/auth/cephx/CephxProtocol.h@1f2876b4edf1529fd66b0b75bd2ab98354abb51e#L79
source:src/client/SyntheticClient.h@79549a261cba816543c0295de078bfc3b8a57529#L26
source:src/include/ceph_fs.h@756b251bac81db92495d68c208e781c712ee3e2a#L115
Updated by Sage Weil almost 14 years ago
- Priority changed from Normal to Low
Sure, these could be changed, but I think it's a pretty low priority item.
Updated by Sage Weil over 12 years ago
- Status changed from Closed to In Progress
- Assignee set to Markus Elfring
We are happy to replace any set of #define FOO_* constants with enums.. any patches to that are welcome, as long as we avoid changing any constants that are exposed outside of a running process.
Updated by Markus Elfring over 12 years ago
How can agreements be achieved about names for corresponding enumerations and type definitions?
Would you like to use any macros for consistent name generation?
Updated by Sage Weil over 12 years ago
The names should already have some shared prefix. If they don't, don't touch them. No macros needed.
Updated by Markus Elfring over 12 years ago
Have you got any additional preferences about naming conventions for enumeration types?
Updated by Sage Weil over 12 years ago
Yes: do no change the names.
#define FOO_A 1
#define FOO_B 2
->
enum {
FOO_A = 1,
FOO_B = 2,
};
Updated by Markus Elfring over 12 years ago
I do not want to change the value identifiers.
Do you really want to work with unnamed/anonymous enumerations?
Do you prefer any specific name selection (NVE) to enable the reuse of explicit data types?
Updated by Sage Weil over 12 years ago
- Status changed from In Progress to Closed