This removes the _addTokenTo and _removeTokenFrominternal functions (which had a notice indicating they were not meant to be used, and only existed due to a language limitation, and are therefore not considered part of the API). They have been inlined into _mint and _burn, making it easier to understand how each function is called in ERC721Enumerable.
Additionally, #839 had already been accidentally fixed in #1539, but the current implementation makes it more obvious that the issues is gone.
Coverage dropped due to a check that is now in _burn and used to be tested via _removeTokenFrom in the tests I got rid of, but that require won't make sense after #1550 goes in - we could first merge that PR and then this one on top.
Should be ready now, @frangio PTAL. The functions for adding/removing tokens from both enumerations should be replaced by a function that receives a storage mapping (they are pretty much the same), but sadly that isn't supported in 0.4.x.
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.