Skip to content

Commit

Permalink
Make url's move constructor & move assignment defaulted
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev committed Aug 13, 2019
1 parent ad6f243 commit 870d432
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/url.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,8 @@ class url {
url& operator=(const url& src) = default;

// Move constructor & assignment
// NOTE: the VS2013 doesn't support defaulted move constructors and
// move assignment operators; see:
// https://msdn.microsoft.com/en-us/library/hh567368.aspx
// https://stackoverflow.com/questions/24573963
url(url&& src)
: norm_url_(std::move(src.norm_url_))
, part_end_(src.part_end_)
, scheme_inf_(src.scheme_inf_)
, flags_(src.flags_)
, path_segment_count_(src.path_segment_count_)
{}
url& operator=(url&& src) {
norm_url_ = std::move(src.norm_url_);
part_end_ = src.part_end_;
scheme_inf_ = src.scheme_inf_;
flags_ = src.flags_;
path_segment_count_ = src.path_segment_count_;
return *this;
}
url(url&& src) = default;
url& operator=(url&& src) = default;

void clear();

Expand Down

0 comments on commit 870d432

Please sign in to comment.