summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--url/gurl.cc16
-rw-r--r--url/gurl.h16
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);
}
diff --git a/url/gurl.h b/url/gurl.h
index f370934..ef1e529 100644
--- a/url/gurl.h
+++ b/url/gurl.h
@@ -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