Unverified Commit 2050bab0 authored by Anna Henningsen's avatar Anna Henningsen Committed by Ruben Bridgewater
Browse files

src: minor cleanups to node_url.cc

- Remove pointless pointers
- Make `WriteHost` take a const argument so that it’s functionality
  is clear from the signature
- Make `FindLongestZeroSequence` templated to accommodate the constness
  in `WriteHost` and because using `uint16_t` is an articifial,
  unnecessary restriction
- Remove string copying when no copies are needed
- Make `PercentDecode` just return its return value
- Make `ParseHost` (string-only version) take its constant argument
  as a constant reference

PR-URL: https://github.com/nodejs/node/pull/17470


Reviewed-By: default avatarTimothy Gu <timothygu99@gmail.com>
parent d11f7d54
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment