Remove LittleEndian<T> #215
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
All the systems vrs supports are little endian, and there are many other little endian dependencies all over the place that would be really difficult to remove. Therefore, we should not pretend that vrs could easily be made to work on a little endian system and the LittleEndian class should be removed. This class also makes debugging more painful, as the values are all hidden in containers.
So everywhere
LittleEndian<T> variableNameis used, we replace it with a simpleT variableName, then fix all the places variableName is used with direct manipulation of the member variable without going through any getter or setter. By adding operators in previous diff, we reduced the number of places where we still use getters to a very small number.LittleEndian used to default init its value, so we need to carefully init these variables to avoid introducing bugs.
Differential Revision: D83631395