diff options
Diffstat (limited to 'url/gurl.cc')
-rw-r--r-- | url/gurl.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/url/gurl.cc b/url/gurl.cc index 60850e6..15de85a 100644 --- a/url/gurl.cc +++ b/url/gurl.cc @@ -167,18 +167,8 @@ void GURL::InitializeFromCanonicalSpec() { GURL::~GURL() { } -GURL& GURL::operator=(const GURL& other) { - if (&other == this) - return *this; - - spec_ = other.spec_; - is_valid_ = other.is_valid_; - parsed_ = other.parsed_; - inner_url_.reset(NULL); - if (other.inner_url_) - inner_url_.reset(new GURL(*other.inner_url_)); - // Valid filesystem urls should always have an inner_url_. - DCHECK(!is_valid_ || !SchemeIsFileSystem() || inner_url_); +GURL& GURL::operator=(GURL other) { + Swap(&other); return *this; } |