Skip to content

Commit

Permalink
src: make url host a proper C++ class
Browse files Browse the repository at this point in the history
- Gives `URLHost` a proper destructor that clears memory
  depending on the type of the host (This fixes a memory leak)
- Hide the host type enums and class layout as implementation details
- Make the `Parse` methods members of `URLHost`
- Turn `WriteHost` into a `ToString()` method on the `URLHost` class
- Verify that at the beginning of a parse attempt, the type is set
  to “failed”
- Remove a lot of `goto`s from the source code 🐢🚀

PR-URL: #17470
Fixes: #17448
Reviewed-By: Timothy Gu <[email protected]>
  • Loading branch information
addaleax authored and MylesBorins committed Jan 22, 2018
1 parent 6c9bdc1 commit c2028fa
Showing 1 changed file with 147 additions and 122 deletions.
Loading

0 comments on commit c2028fa

Please sign in to comment.