So it's easier to compare, and we don't need to allocate to convert it to a string like in
DRSTable.resource_ext(). You can now just do something like table.resource_type() == "slp".
This flips the internal representation of ResourceType so it's more useful and it's less like the representation on disk. We instead flip it again when writing to disk. It's just swapping 4 bytes, so it's much cheaper than having to allocate every time resource_ext() is used!
So it's easier to compare, and we don't need to allocate to convert it to a string like in
DRSTable.resource_ext()
. You can now just do something liketable.resource_type() == "slp"
.This flips the internal representation of ResourceType so it's more useful and it's less like the representation on disk. We instead flip it again when writing to disk. It's just swapping 4 bytes, so it's much cheaper than having to allocate every time
resource_ext()
is used!