encounter / objdiff

A local diffing tool for decompilation projects
Apache License 2.0
79 stars 13 forks source link

Replace flagset crate with simple bools #26

Closed NickCondron closed 5 months ago

NickCondron commented 1 year ago

flagset crate was used for only 4 separate bools which is probably overkill. This change removes a dependency and simplifies the code

encounter commented 1 year ago

I'm thinking this could just be an enum. The symbols will either be Global, Global|Weak, Global|Common or Local.

ribbanya commented 5 months ago

Nested enum can also work, if the semantics are important enough.

enum ObjSymbolScope {
   Global(ObjSymbolGlobalSubtype),
   Local,
}

enum ObjSymbolGlobalSubtype {
  None,
  Weak,
  Local,
}

I definitely didn't notice the year on the dates.

encounter commented 5 months ago

I'll likely be merging these types with decomp-toolkit's eventually, which would conflict with this idea. Regardless, thanks for the cleanup PRs!