@@ -412,7 +412,7 @@ inline void url_aggregator::append_base_username(const std::string_view input) {
412412 ADA_ASSERT_TRUE (validate ());
413413}
414414
415- inline void url_aggregator::clear_password () {
415+ constexpr void url_aggregator::clear_password () {
416416 ada_log (" url_aggregator::clear_password " , to_string (), " \n " , to_diagram ());
417417 ADA_ASSERT_TRUE (validate ());
418418 if (!has_password ()) {
@@ -634,7 +634,7 @@ inline void url_aggregator::clear_hash() {
634634 ADA_ASSERT_TRUE (validate ());
635635}
636636
637- inline void url_aggregator::clear_pathname () {
637+ constexpr void url_aggregator::clear_pathname () {
638638 ada_log (" url_aggregator::clear_pathname" );
639639 ADA_ASSERT_TRUE (validate ());
640640 uint32_t ending_index = uint32_t (buffer.size ());
@@ -669,7 +669,7 @@ inline void url_aggregator::clear_pathname() {
669669 ada_log (" url_aggregator::clear_pathname completed, running checks... ok" );
670670}
671671
672- inline void url_aggregator::clear_hostname () {
672+ constexpr void url_aggregator::clear_hostname () {
673673 ada_log (" url_aggregator::clear_hostname" );
674674 ADA_ASSERT_TRUE (validate ());
675675 if (!has_authority ()) {
@@ -706,22 +706,22 @@ inline void url_aggregator::clear_hostname() {
706706 ADA_ASSERT_TRUE (validate ());
707707}
708708
709- [[nodiscard]] inline bool url_aggregator::has_hash () const noexcept {
709+ [[nodiscard]] constexpr bool url_aggregator::has_hash () const noexcept {
710710 ada_log (" url_aggregator::has_hash" );
711711 return components.hash_start != url_components::omitted;
712712}
713713
714- [[nodiscard]] inline bool url_aggregator::has_search () const noexcept {
714+ [[nodiscard]] constexpr bool url_aggregator::has_search () const noexcept {
715715 ada_log (" url_aggregator::has_search" );
716716 return components.search_start != url_components::omitted;
717717}
718718
719- ada_really_inline bool url_aggregator::has_credentials () const noexcept {
719+ constexpr bool url_aggregator::has_credentials () const noexcept {
720720 ada_log (" url_aggregator::has_credentials" );
721721 return has_non_empty_username () || has_non_empty_password ();
722722}
723723
724- inline bool url_aggregator::cannot_have_credentials_or_port () const {
724+ constexpr bool url_aggregator::cannot_have_credentials_or_port () const {
725725 ada_log (" url_aggregator::cannot_have_credentials_or_port" );
726726 return type == ada::scheme::type::FILE ||
727727 components.host_start == components.host_end ;
@@ -732,7 +732,7 @@ url_aggregator::get_components() const noexcept {
732732 return components;
733733}
734734
735- [[nodiscard]] inline bool ada::url_aggregator::has_authority () const noexcept {
735+ [[nodiscard]] constexpr bool ada::url_aggregator::has_authority () const noexcept {
736736 ada_log (" url_aggregator::has_authority" );
737737 // Performance: instead of doing this potentially expensive check, we could
738738 // have a boolean in the struct.
@@ -767,28 +767,28 @@ inline void ada::url_aggregator::add_authority_slashes_if_needed() noexcept {
767767 ADA_ASSERT_TRUE (validate ());
768768}
769769
770- inline void ada::url_aggregator::reserve (uint32_t capacity) {
770+ constexpr void ada::url_aggregator::reserve (uint32_t capacity) {
771771 buffer.reserve (capacity);
772772}
773773
774- inline bool url_aggregator::has_non_empty_username () const noexcept {
774+ constexpr bool url_aggregator::has_non_empty_username () const noexcept {
775775 ada_log (" url_aggregator::has_non_empty_username" );
776776 return components.protocol_end + 2 < components.username_end ;
777777}
778778
779- inline bool url_aggregator::has_non_empty_password () const noexcept {
779+ constexpr bool url_aggregator::has_non_empty_password () const noexcept {
780780 ada_log (" url_aggregator::has_non_empty_password" );
781781 return components.host_start - components.username_end > 0 ;
782782}
783783
784- inline bool url_aggregator::has_password () const noexcept {
784+ constexpr bool url_aggregator::has_password () const noexcept {
785785 ada_log (" url_aggregator::has_password" );
786786 // This function does not care about the length of the password
787787 return components.host_start > components.username_end &&
788788 buffer[components.username_end ] == ' :' ;
789789}
790790
791- inline bool url_aggregator::has_empty_hostname () const noexcept {
791+ constexpr bool url_aggregator::has_empty_hostname () const noexcept {
792792 if (!has_hostname ()) {
793793 return false ;
794794 }
@@ -801,18 +801,18 @@ inline bool url_aggregator::has_empty_hostname() const noexcept {
801801 return components.username_end != components.host_start ;
802802}
803803
804- inline bool url_aggregator::has_hostname () const noexcept {
804+ constexpr bool url_aggregator::has_hostname () const noexcept {
805805 return has_authority ();
806806}
807807
808- inline bool url_aggregator::has_port () const noexcept {
808+ constexpr bool url_aggregator::has_port () const noexcept {
809809 ada_log (" url_aggregator::has_port" );
810810 // A URL cannot have a username/password/port if its host is null or the empty
811811 // string, or its scheme is "file".
812812 return has_hostname () && components.pathname_start != components.host_end ;
813813}
814814
815- [[nodiscard]] inline bool url_aggregator::has_dash_dot () const noexcept {
815+ [[nodiscard]] constexpr bool url_aggregator::has_dash_dot () const noexcept {
816816 // If url's host is null, url does not have an opaque path, url's path's size
817817 // is greater than 1, and url's path[0] is the empty string, then append
818818 // U+002F (/) followed by U+002E (.) to output.
@@ -844,7 +844,7 @@ inline bool url_aggregator::has_port() const noexcept {
844844 buffer[components.host_end + 1 ] == ' .' ;
845845}
846846
847- [[nodiscard]] inline std::string_view url_aggregator::get_href () const noexcept
847+ [[nodiscard]] constexpr std::string_view url_aggregator::get_href () const noexcept
848848 ada_lifetime_bound {
849849 ada_log (" url_aggregator::get_href" );
850850 return buffer;
@@ -889,7 +889,7 @@ ada_really_inline size_t url_aggregator::parse_port(
889889 return consumed;
890890}
891891
892- inline void url_aggregator::set_protocol_as_file () {
892+ constexpr void url_aggregator::set_protocol_as_file () {
893893 ada_log (" url_aggregator::set_protocol_as_file " );
894894 ADA_ASSERT_TRUE (validate ());
895895 type = ada::scheme::type::FILE;
0 commit comments