@@ -106,7 +106,7 @@ inline void url_aggregator::update_unencoded_base_hash(std::string_view input) {
106106ada_really_inline uint32_t url_aggregator::replace_and_resize (
107107 uint32_t start, uint32_t end, std::string_view input) {
108108 uint32_t current_length = end - start;
109- uint32_t input_size = uint32_t (input.size ());
109+ auto input_size = static_cast < uint32_t > (input.size ());
110110 uint32_t new_difference = input_size - current_length;
111111
112112 if (current_length == 0 ) {
@@ -155,7 +155,7 @@ inline void url_aggregator::update_base_hostname(const std::string_view input) {
155155[[nodiscard]] ada_really_inline uint32_t
156156url_aggregator::get_pathname_length () const noexcept {
157157 ada_log (" url_aggregator::get_pathname_length" );
158- uint32_t ending_index = uint32_t (buffer.size ());
158+ auto ending_index = static_cast < uint32_t > (buffer.size ());
159159 if (components.search_start != url_components::omitted) {
160160 ending_index = components.search_start ;
161161 } else if (components.hash_start != url_components::omitted) {
@@ -307,7 +307,7 @@ inline void url_aggregator::append_base_pathname(const std::string_view input) {
307307 std::string path_expected (get_pathname ());
308308 path_expected.append (input);
309309#endif // ADA_DEVELOPMENT_CHECKS
310- uint32_t ending_index = uint32_t (buffer.size ());
310+ auto ending_index = static_cast < uint32_t > (buffer.size ());
311311 if (components.search_start != url_components::omitted) {
312312 ending_index = components.search_start ;
313313 } else if (components.hash_start != url_components::omitted) {
@@ -384,7 +384,7 @@ inline void url_aggregator::append_base_username(const std::string_view input) {
384384 return ;
385385 }
386386
387- uint32_t difference = uint32_t (input.size ());
387+ auto difference = static_cast < uint32_t > (input.size ());
388388 buffer.insert (components.username_end , input);
389389 components.username_end += difference;
390390 components.host_start += difference;
@@ -452,7 +452,7 @@ inline void url_aggregator::update_base_password(const std::string_view input) {
452452 }
453453
454454 bool password_exists = has_password ();
455- uint32_t difference = uint32_t (input.size ());
455+ auto difference = static_cast < uint32_t > (input.size ());
456456
457457 if (password_exists) {
458458 uint32_t current_length =
@@ -503,7 +503,7 @@ inline void url_aggregator::append_base_password(const std::string_view input) {
503503 return ;
504504 }
505505
506- uint32_t difference = uint32_t (input.size ());
506+ auto difference = static_cast < uint32_t > (input.size ());
507507 if (has_password ()) {
508508 buffer.insert (components.host_start , input);
509509 } else {
@@ -548,7 +548,7 @@ inline void url_aggregator::update_base_port(uint32_t input) {
548548 // calling std::to_string(input.value()) is unfortunate given that the port
549549 // value is probably already available as a string.
550550 std::string value = helpers::concat (" :" , std::to_string (input));
551- uint32_t difference = uint32_t (value.size ());
551+ auto difference = static_cast < uint32_t > (value.size ());
552552
553553 if (components.port != url_components::omitted) {
554554 difference -= components.pathname_start - components.host_end ;
@@ -637,7 +637,7 @@ inline void url_aggregator::clear_hash() {
637637constexpr void url_aggregator::clear_pathname () {
638638 ada_log (" url_aggregator::clear_pathname" );
639639 ADA_ASSERT_TRUE (validate ());
640- uint32_t ending_index = uint32_t (buffer.size ());
640+ auto ending_index = static_cast < uint32_t > (buffer.size ());
641641 if (components.search_start != url_components::omitted) {
642642 ending_index = components.search_start ;
643643 } else if (components.hash_start != url_components::omitted) {
@@ -867,7 +867,7 @@ ada_really_inline size_t url_aggregator::parse_port(
867867 return 0 ;
868868 }
869869 ada_log (" parse_port: " , parsed_port);
870- const size_t consumed = size_t (r.ptr - view.data ());
870+ const auto consumed = static_cast < size_t > (r.ptr - view.data ());
871871 ada_log (" parse_port: consumed " , consumed);
872872 if (check_trailing_content) {
873873 is_valid &=
0 commit comments