Replies: 1 comment 4 replies
-
Hi @ZehMatt, If you have some time to address this improvement it would be great! |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my opinion it would be best to refactor the enum classes such as ELF/enums.hpp PE/enums.hpp etc. to use different names other than their macro counter parts. Things like
MACHINE_TYPES::IMAGE_FILE_MACHINE_UNKNOWN
should beMachineType::Unknown
. This would prevent the clash with macros and makes it a bit nicer in my opinion, it's a strong enum so we shouldn't use all capital case for such constants and there is definitely no need to prefix them as strong enums dont pollute the global namespace, this would also kill the need to have undef.hpp which can be problematic for when the macro constant is used somewhere else that happens to include something from LIEF. I know this is a bit of API breaking change but it's probably for the better in the long run. Another side effect is that we will finally get rid of the last warning when building LIEF with msvc.Beta Was this translation helpful? Give feedback.
All reactions