Skip to content

Update EnumOption to use EnumerationArray

Mark Abraham requested to merge use-more-enumerationarray into master

Avoids code needing to mis-use the m_elements member of the EnumerationArray. Encourages using class enums for command-line options. Removes a bunch of clang-tidy suppressions and will be needed for dealing properly with even more warnings coming with clang-tidy 9. Removes a bunch of comments about how this list has to match that enum somewhere else, because the compiler will tell us that.

Fixed time-unit conversion bug introduced a decade ago in bc23d95b. That's exactly the kind of bug that now gets caught at compile time.

Removed strange first field of legacy enums time_unit_t and xvg_format_t that forced complicated casting and searching. It didn't seem to do anything useful.

Removed unnecessary EnumIntOption.

Some test code is now in gmx::test namespace for brevity (consistent with other test code), now that the enum values are much longer.

Change-Id: I9fd398d8981115d2317614912e64a9129ff1253a

Edited by Mark Abraham

Merge request reports