@@ -166,13 +166,13 @@ void uri::initialize(optional<string_type> scheme,
166
166
}
167
167
}
168
168
169
- uri::uri () : uri_view_(uri_), uri_parts_() {}
169
+ uri::uri () : uri_view_(uri_) {}
170
170
171
- uri::uri (const uri &other) : uri_(other.uri_), uri_view_(uri_), uri_parts_() {
171
+ uri::uri (const uri &other) : uri_(other.uri_), uri_view_(uri_) {
172
172
detail::advance_parts (uri_view_, uri_parts_, other.uri_parts_ );
173
173
}
174
174
175
- uri::uri (const uri_builder &builder) : uri_parts_() {
175
+ uri::uri (const uri_builder &builder) {
176
176
initialize (builder.scheme_ , builder.user_info_ , builder.host_ , builder.port_ ,
177
177
builder.path_ , builder.query_ , builder.fragment_ );
178
178
}
@@ -194,11 +194,12 @@ uri &uri::operator=(uri other) {
194
194
}
195
195
196
196
void uri::swap (uri &other) noexcept {
197
- auto parts = uri_parts_;
198
- advance_parts (other.uri_view_ , uri_parts_, other.uri_parts_ );
199
197
uri_.swap (other.uri_ );
200
198
uri_view_.swap (other.uri_view_ );
201
- advance_parts (other.uri_view_ , other.uri_parts_ , parts);
199
+
200
+ const auto this_parts = uri_parts_;
201
+ detail::advance_parts (uri_view_, uri_parts_, other.uri_parts_ );
202
+ detail::advance_parts (other.uri_view_ , other.uri_parts_ , this_parts);
202
203
}
203
204
204
205
uri::const_iterator uri::begin () const noexcept { return uri_view_.begin (); }
0 commit comments