diff options
-rw-r--r-- | url/gurl.cc | 16 | ||||
-rw-r--r-- | url/gurl.h | 16 |
2 files changed, 20 insertions, 12 deletions
diff --git a/url/gurl.cc b/url/gurl.cc index b580125..46ca408 100644 --- a/url/gurl.cc +++ b/url/gurl.cc @@ -177,6 +177,22 @@ const std::string& GURL::spec() const { return EmptyStringForGURL(); } +bool GURL::operator==(const GURL& other) const { + return spec_ == other.spec_; +} + +bool GURL::operator!=(const GURL& other) const { + return spec_ != other.spec_; +} + +bool GURL::operator<(const GURL& other) const { + return spec_ < other.spec_; +} + +bool GURL::operator>(const GURL& other) const { + return spec_ > other.spec_; +} + GURL GURL::Resolve(const std::string& relative) const { return ResolveWithCharsetConverter(relative, NULL); } @@ -112,20 +112,12 @@ class URL_EXPORT GURL { } // Defiant equality operator! - bool operator==(const GURL& other) const { - return spec_ == other.spec_; - } - bool operator!=(const GURL& other) const { - return spec_ != other.spec_; - } + bool operator==(const GURL& other) const; + bool operator!=(const GURL& other) const; // Allows GURL to used as a key in STL (for example, a std::set or std::map). - bool operator<(const GURL& other) const { - return spec_ < other.spec_; - } - bool operator>(const GURL& other) const { - return spec_ > other.spec_; - } + bool operator<(const GURL& other) const; + bool operator>(const GURL& other) const; // Resolves a URL that's possibly relative to this object's URL, and returns // it. Absolute URLs are also handled according to the rules of URLs on web |