]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Implement String::operator<
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 12 Sep 2011 23:21:15 +0000 (01:21 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 12 Sep 2011 23:21:15 +0000 (01:21 +0200)
src/SquidString.h
src/String.cci

index 76adafd85d582db21246a798f3f9a57f3a525d76..929fd4ffa0cb8dfe0c5b84b1b2d6813883b33cce 100644 (file)
@@ -181,6 +181,8 @@ private:
 
 _SQUID_INLINE_ std::ostream & operator<<(std::ostream& os, String const &aString);
 
+_SQUID_INLINE_ bool operator<(const String &a, const String &b);
+
 #if _USE_INLINE_
 #include "String.cci"
 #endif
index fe6b8fed741780a30612a553bee56acb6058592f..2bc3f8f4184a08ec937d5a67247e4ebfc3bc6e33 100644 (file)
@@ -200,3 +200,9 @@ operator<<(std::ostream& os, String const &aString)
     os.write(aString.rawBuf(),aString.size());
     return os;
 }
+
+bool
+operator<(const String &a, const String &b)
+{
+    return a.cmp(b) < 0;
+}