]> granicus.if.org Git - icinga2/commitdiff
Fixed incorrect use of boost::algorithm::is_iless.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 31 Oct 2012 11:06:21 +0000 (12:06 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 31 Oct 2012 11:06:21 +0000 (12:06 +0100)
lib/base/dynamicobject.h
lib/base/qstring.h

index 651d7cc2eba7eca100abc84cbef2decdc1941f61..e7f4814db50c376525a7d7e259d7723772f4831e 100644 (file)
@@ -74,11 +74,11 @@ public:
 
        typedef function<DynamicObject::Ptr (const Dictionary::Ptr&)> Factory;
 
-       typedef map<String, Factory, boost::algorithm::is_iless> ClassMap;
-       typedef map<String, DynamicObject::Ptr, boost::algorithm::is_iless> NameMap;
-       typedef map<String, NameMap, boost::algorithm::is_iless> TypeMap;
+       typedef map<String, Factory, string_iless> ClassMap;
+       typedef map<String, DynamicObject::Ptr, string_iless> NameMap;
+       typedef map<String, NameMap, string_iless> TypeMap;
 
-       typedef map<String, DynamicAttribute, boost::algorithm::is_iless> AttributeMap;
+       typedef map<String, DynamicAttribute, string_iless> AttributeMap;
        typedef AttributeMap::iterator AttributeIterator;
        typedef AttributeMap::const_iterator AttributeConstIterator;
 
index b5fe1c87ccc0875104931e13b47527d098c5e9b7..4cd81b1a4a4f5216ae8ad0f7047f5bb535a1f64b 100644 (file)
@@ -118,6 +118,15 @@ I2_BASE_API String::ConstIterator range_begin(const String& x);
 I2_BASE_API String::Iterator range_end(String& x);
 I2_BASE_API String::ConstIterator range_end(const String& x);
 
+struct string_iless : std::binary_function<String, String, bool>
+{
+       bool operator()(const String& s1, const String& s2) const
+       {
+               return lexicographical_compare(s1.Begin(), s1.End(),
+                   s2.Begin(), s2.End(), boost::algorithm::is_iless());
+       }
+};
+
 }
 
 namespace boost