Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jan 29, 2024
1 parent 8c8369d commit d055c08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/url.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ ada_really_inline bool url::parse_host(std::string_view input) {
ada_log("parse_host to_ascii returns false");
return is_valid = false;
}
ada_log("parse_host to_ascii succeeded ", *host, " [", host->size(), " bytes]");
ada_log("parse_host to_ascii succeeded ", *host, " [", host->size(),
" bytes]");

if (std::any_of(host.value().begin(), host.value().end(),
ada::unicode::is_forbidden_domain_code_point)) {
Expand Down
10 changes: 7 additions & 3 deletions src/url_aggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ bool url_aggregator::set_href(const std::string_view input) {
}

ada_really_inline bool url_aggregator::parse_host(std::string_view input) {
ada_log("url_aggregator:parse_host \"", input, "\" [", input.size(), " bytes]");
ada_log("url_aggregator:parse_host \"", input, "\" [", input.size(),
" bytes]");
ADA_ASSERT_TRUE(validate());
ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer));
if (input.empty()) {
Expand Down Expand Up @@ -491,7 +492,8 @@ ada_really_inline bool url_aggregator::parse_host(std::string_view input) {
ada_log("parse_host to_ascii returns false");
return is_valid = false;
}
ada_log("parse_host to_ascii succeeded ", *host, " [", host->size(), " bytes]");
ada_log("parse_host to_ascii succeeded ", *host, " [", host->size(),
" bytes]");

if (std::any_of(host.value().begin(), host.value().end(),
ada::unicode::is_forbidden_domain_code_point)) {
Expand Down Expand Up @@ -931,7 +933,9 @@ bool url_aggregator::parse_ipv4(std::string_view input, bool in_place) {

// We could also check r.ptr to see where the parsing ended.
if (in_place && pure_decimal_count == 4 && !trailing_dot) {
ada_log("url_aggregator::parse_ipv4 completed and was already correct in the buffer");
ada_log(
"url_aggregator::parse_ipv4 completed and was already correct in the "
"buffer");
// The original input was already all decimal and we validated it. So we
// don't need to do anything.
} else {
Expand Down

0 comments on commit d055c08

Please sign in to comment.